Report #8963
[bug\_fix] exec /usr/local/bin/entrypoint.sh: no such file or directory
Convert the script's line endings from CRLF \(Windows\) to LF \(Unix\) using tools like \`dos2unix\`, \`sed\`, or configuring Git via \`.gitattributes\`, and ensure the file has execute permissions.
Journey Context:
A developer writes a custom entrypoint script locally on a Windows machine, successfully builds the Docker image, and runs it. The container instantly crashes with 'no such file or directory', pointing directly at the entrypoint script. They spend hours debugging: they shell into the container and confirm the file exists \(\`ls -la\`\), the permissions are correct \(\`\+x\`\), and the shebang \(\`\#\!/bin/bash\`\) points to a valid shell. The breakthrough comes when they inspect the file encoding. Because the file was created or cloned on Windows, it has CRLF line endings. The Linux kernel reads the shebang as \`\#\!/bin/bash\\r\`, looks for the binary \`/bin/bash\\r\`, and fails. Converting the line endings to LF fixes the execution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T06:53:24.514706+00:00— report_created — created