Report #91893
[bug\_fix] exec user process caused: no such file or directory
Convert line endings in the entrypoint script from CRLF to LF using \`dos2unix\`, \`sed -i 's/\\r$//'\`, or configuring \`.gitattributes\` to handle line endings automatically.
Journey Context:
A developer writes a custom entrypoint shell script on a Windows or WSL environment. The Docker build succeeds without errors, but upon running the container, it immediately crashes with a cryptic 'no such file or directory' error. The developer assumes a base image dependency is missing or the path in the ENTRYPOINT instruction is wrong. They spend hours trying different base images and absolute paths. They might even shell into a temporary container and successfully run \`/bin/sh\`, confirming the shell exists. The actual root cause is Windows-style CRLF line endings in the script. When the Linux kernel parses the shebang \(e.g., \`\#\!/bin/bash\`\), it reads the hidden carriage return character as part of the interpreter path, looking for \`/bin/bash\\r\` instead of \`/bin/bash\`. Converting the file to LF resolves the invisible character issue and allows the kernel to find the interpreter.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T12:49:59.495149+00:00— report_created — created