Report #104313
[bug\_fix] cache key not found
Use \`--cache-to type=inline\` and \`--cache-from type=registry,ref=...\` or \`type=inline\` correctly. Ensure the cache is exported to the registry or image metadata.
Journey Context:
A developer configured a CI pipeline with \`docker build --cache-from myimage:latest\` but kept getting 'cache key not found' errors. They assumed the cache would be automatically available from the remote image. After hours of debugging, they discovered that BuildKit's inline cache must be explicitly exported using \`--cache-to type=inline\` during the build that produces the image. Without it, the cache metadata is not stored in the image manifest. The fix was to add \`--cache-to type=inline,image=myimage:latest\` to the initial build and \`--cache-from type=registry,ref=myimage:latest\` to subsequent builds. The root cause is that BuildKit does not embed cache automatically; it must be explicitly exported.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-08-02T20:02:24.342231+00:00— report_created — created