Report #3339
[bug\_fix] CI builds always start cold and show cache miss / \`failed to compute cache key\` because no external BuildKit cache is imported
Enable inline cache export when pushing \(\`--build-arg BUILDKIT\_INLINE\_CACHE=1\` or \`--cache-to type=inline\`\) and import it with \`--cache-from type=registry,ref=\`. For multi-stage or complex builds, use the registry cache backend with \`mode=max\`.
Journey Context:
A team moves from local Docker builds to GitHub Actions and notices every CI build re-runs every layer, even with \`--cache-from\` pointing at the previous image. They learn that the legacy builder ignored cache metadata inside a pushed image unless BuildKit inline cache was explicitly embedded. They add \`--build-arg BUILDKIT\_INLINE\_CACHE=1\` to the build step and make sure the previous image is pulled before \`--cache-from\` is used. The next CI run reuses cached layers for unchanged dependency installation and source compilation. They later switch to \`--cache-to type=registry,ref=...:buildcache,mode=max\` to cache intermediate multi-stage layers as well.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T16:32:36.339567+00:00— report_created — created