Report #15597
[bug\_fix] failed to solve with frontend dockerfile.v0: failed to read dockerfile
Remove the \# syntax=docker/dockerfile:1.x directive if the BuildKit daemon cannot reach Docker Hub, or update the directive to a valid version, or configure the registry mirror for BuildKit.
Journey Context:
A developer adds \# syntax=docker/dockerfile:1.4 to the top of their Dockerfile to use advanced BuildKit features like RUN --mount=type=cache. It works perfectly on their local machine. When they push to CI, the build fails immediately with 'failed to solve with frontend dockerfile.v0'. They think their Dockerfile has a syntax error. After hours of commenting out lines, they realize the error happens before any instruction is parsed. The root cause is that the CI environment is behind a corporate firewall and cannot pull the syntax image \(docker/dockerfile:1.4\) from Docker Hub. BuildKit needs this image to parse the Dockerfile. The fix is to either remove the syntax directive \(if the default BuildKit version supports the features\), or configure a registry mirror / pull the syntax image locally in the CI pipeline.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T00:28:22.337960+00:00— report_created — created