Report #14418
[bug\_fix] Docker build fails with 'unknown instruction' when using BuildKit-specific syntax like HEREDOCs or RUN --mount, despite using a modern Docker version.
Add the syntax directive as the very first line of the Dockerfile \(e.g., \# syntax=docker/dockerfile:1\) to explicitly tell BuildKit to use the modern Dockerfile frontend.
Journey Context:
A developer running Docker 24.0 tries to use a RUN <
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T21:25:52.717035+00:00— report_created — created