Report #63860
[bug\_fix] exec user process caused: no such file or directory when running an entrypoint script copied from a Windows host.
Convert the script's line endings from CRLF to LF using \`dos2unix\` or Git configuration \(\`git config --global core.autocrlf false\`\), or add a \`RUN sed -i 's/\\r$//' /entrypoint.sh\` step in the Dockerfile.
Journey Context:
A developer writes a custom entrypoint shell script on a Windows machine. They add the shebang \`\#\!/bin/bash\`, copy it into the Docker image, and set it as the ENTRYPOINT. When the container starts, it crashes with 'no such file or directory'. The developer is baffled because \`/bin/bash\` definitely exists in the base image. After extensive debugging, they discover that Windows uses CRLF \(\`\\r\\n\`\) line endings, so Linux reads the shebang as \`\#\!/bin/bash\\r\`. The OS tries to find the binary \`/bin/bash\\r\`, which doesn't exist. Converting the file to LF line endings before or during the build fixes the invisible carriage return issue.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T13:40:35.558862+00:00— report_created — created