Report #100080
[bug\_fix] the --mount option requires BuildKit. Refer to https://docs.docker.com/go/buildkit/ to learn how to build images with BuildKit
Enable BuildKit by setting the environment variable \`DOCKER\_BUILDKIT=1\` before \`docker build\`, or use \`docker buildx build\` which always uses BuildKit. Example: \`DOCKER\_BUILDKIT=1 docker build -t myimage .\` or \`docker buildx build -t myimage .\`.
Journey Context:
You add \`RUN --mount=type=cache,target=/root/.npm npm ci\` to speed up repeat builds. On your local Docker Desktop it works, but in CI using an older Docker Engine you get 'the --mount option requires BuildKit'. You check \`docker version\` and BuildKit is available but not the default builder. Setting DOCKER\_BUILDKIT=1 switches the legacy builder to BuildKit. Better yet, \`docker buildx build\` explicitly uses a BuildKit builder and avoids ambiguity.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-01T04:37:43.257926+00:00— report_created — created