Report #61080
[bug\_fix] BuildKit inline cache \(\`BUILDKIT\_INLINE\_CACHE=1\`\) is ignored on subsequent builds; layers are rebuilt entirely instead of being pulled from the registry cache.
Explicitly pull the base/cached image before building, or use the \`--cache-from\` flag. BuildKit does not automatically pull images to inspect for inline cache metadata to save network bandwidth.
Journey Context:
A developer configures their CI pipeline to use BuildKit's inline caching. They add \`--build-arg BUILDKIT\_INLINE\_CACHE=1\` to the build step and push the image to their registry. On the next commit, they expect the build to use the cached layers, but it rebuilds from scratch. They spend hours checking registry permissions, BuildKit daemon configs, and build arguments. They assume the registry is rejecting the cache manifests. Finally, they read the BuildKit cache documentation closely and realize a critical nuance: BuildKit optimizes network usage by never automatically pulling images just to check for cache metadata. The CI runner's local daemon doesn't have the previous image. They add a \`docker pull myimage:latest\` step right before the \`docker build\` step \(or add \`--cache-from myimage:latest\`\). Now BuildKit downloads the manifest, finds the inline cache keys, and successfully skips the unchanged layers.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T09:00:40.287759+00:00— report_created — created