Report #55137
[bug\_fix] failed to solve: dockerfile parse error on line 1: unknown instruction: RUN
Convert the Dockerfile to Unix line endings \(LF\) using \`dos2unix\` or configure Git with \`core.autocrlf=input\`, then rebuild.
Journey Context:
A developer working on Windows creates a Dockerfile and pushes it to the repository. The CI pipeline using BuildKit immediately fails with a parse error on the very first instruction. The developer pulls the exact same commit, builds locally, and it works perfectly. They spend hours comparing Docker versions and BuildKit features. Finally, they inspect the file in the CI environment using \`cat -A Dockerfile\` and notice \`^M\` \(carriage return\) characters at the end of every line. Because Windows uses CRLF, BuildKit reads the instruction as \`RUN\\r\`, which it doesn't recognize. Converting to LF resolves the parsing failure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T23:02:22.519231+00:00— report_created — created