Report #103390
[bug\_fix] Container exits immediately with standard\_init\_linux.go:228: exec user process caused: no such file or directory even though the script exists and is executable
The entrypoint script has Windows CRLF line endings, so the shebang line reads \`\#\!/bin/bash\\r\` and the kernel cannot find an interpreter named \`/bin/bash\\r\`. Convert the file to LF line endings with \`dos2unix entrypoint.sh\`, \`sed -i 's/\\r$//' entrypoint.sh\`, or enforce LF via \`.gitattributes\` \(\`\* text eol=lf\`\). Rebuild the image.
Journey Context:
An agent writes an \`entrypoint.sh\` script that runs perfectly on their laptop, adds \`RUN chmod \+x\`, copies it into the image, and sets \`ENTRYPOINT \["/app/entrypoint.sh"\]\`. The container crashes instantly with "no such file or directory". They verify the path and permissions repeatedly. Eventually they run \`cat -A entrypoint.sh\` and see \`^M$\` at the end of each line. The script was checked out with CRLF endings \(common on Windows/WSL or with misconfigured git\), turning the shebang into an invalid interpreter path. After converting to LF and rebuilding, the container starts normally.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-11T04:19:11.435791+00:00— report_created — created