TraceResolveSRE Platform
MCP ServerAdmin

Docker: standard_init_linux.go exec user process caused no such file or directory

standard_init_linux.go:228: exec user process caused: no such file or directory container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: exec: "/docker-entrypoint.sh": stat /docker-entrypoint.sh: no such file or directory
Immediate Remediation
bash
sed -i 's/\r$//' docker-entrypoint.sh && docker build --no-cache -t your-image .
Root Cause Analysis

The container's entrypoint script was saved with Windows CRLF line endings, so the kernel tries to execute /bin/sh\r (with a carriage return) which doesn't exist, producing the misleading 'no such file or directory' error.

Verification & Guardrails

  • Also occurs if the shebang points to a missing interpreter (e.g., /bin/bash in Alpine without bash) or if the binary is for a different CPU architecture.
  • Verify with `file docker-entrypoint.sh` — a CRLF file shows 'with CRLF line terminators'.
  • Use `dos2unix` or `sed -i 's/\r$//'` on the file inside the build context, then rebuild the image.

Have a custom or uncategorized crash?

Run your trace through our in-memory client privacy sandbox for instant SRE remediation.

Open Diagnostic Studio