Report #36536
[bug\_fix] failed to solve with frontend dockerfile.v0: failed to create LLB definition
Add \# syntax=docker/dockerfile:1 to the very first line of the Dockerfile to enable the extended BuildKit frontend features, or fix the malformed Dockerfile instruction.
Journey Context:
A developer enables DOCKER\_BUILDKIT=1 to take advantage of advanced caching features like RUN --mount=type=cache. When they run the build, it crashes immediately with an obscure 'failed to create LLB definition' error. They assume BuildKit is broken or their Docker version is too old, and spend hours checking daemon logs and upgrading Docker. The actual issue is that the default Dockerfile frontend embedded in the Docker daemon doesn't understand the --mount syntax. By adding the \# syntax=docker/dockerfile:1 magic comment, BuildKit is instructed to pull the latest frontend image that parses these advanced features, resolving the parsing error immediately.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T15:48:19.326925+00:00— report_created — created