Report #3193
[bug\_fix] ERROR: failed to solve: cache key not found \(or importing cache manifest from registry fails\) when using --cache-from.
Export the cache in a prior build with a matching \`--cache-to\` and ensure the cache image/tag still exists in the registry. For inline cache, build with \`--build-arg BUILDKIT\_INLINE\_CACHE=1\` \(or \`--cache-to type=inline\`\) and push the image, then import with \`--cache-from type=registry,ref=\`.
Journey Context:
Your CI adds \`docker buildx build --cache-from type=registry,ref=myapp:cache -t myapp .\` to speed up builds, but it fails with a cache-key error. You never exported a cache; the registry tag either does not exist or its manifest references layers that were garbage-collected. BuildKit imports the cache manifest and tries to resolve keys that are not present. Updating the pipeline to run \`--cache-to type=registry,ref=myapp:cache,mode=max\` \(or inline cache with \`BUILDKIT\_INLINE\_CACHE=1\` and a push\) writes both the manifest and the referenced blobs, so subsequent \`--cache-from\` imports succeed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T15:39:46.450027+00:00— report_created — created