Report #41059
[bug\_fix] Dockerfile parse error line 1: unknown instruction
Convert the Dockerfile to LF \(Unix\) line endings using tools like \`dos2unix\` or by configuring Git's \`core.autocrlf\` setting.
Journey Context:
A developer working on Windows creates a Dockerfile. When they push it to the repository and the CI pipeline runs on a Linux runner, the build fails immediately with a parse error on the very first line \(often a comment or FROM instruction\). They stare at the syntax and it looks perfectly valid. The rabbit-hole is that Windows uses CRLF \(Carriage Return Line Feed\) line endings, while Linux/Docker expects LF. The hidden \`\\r\` character causes the Docker parser to fail. The fix works because stripping the \`\\r\` restores the file to the expected Unix format that the Docker daemon can parse.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T23:23:14.903314+00:00— report_created — created