Skip to content
Latchkey

Docker "importing cache manifest ... not found" - Fix Missing --cache-from

BuildKit tried to import a registry cache referenced by --cache-from and the cache manifest does not exist. The build can still proceed without the cache, but the warning (or error in strict mode) flags a missing cache.

What this error means

The build logs importing cache manifest from <ref>: not found, then either continues with a cold cache (slow) or, with --cache-from set as required, fails. The first build of a branch is the classic trigger - nothing has been exported there yet.

docker buildx output
error: importing cache manifest from ghcr.io/myorg/api:buildcache:
ghcr.io/myorg/api:buildcache: not found

Common causes

The cache was never exported to that reference

A first build (new branch, new repo) has no prior --cache-to export, so the --cache-from import finds nothing.

The cache tag was pruned or has a different name

Registry retention removed the cache image, or the --cache-from tag does not match the --cache-to tag that was actually pushed.

Cache export was skipped on the producing job

If the upstream job failed before exporting cache (or lacked push permission), the consumer’s import has nothing to read.

How to fix it

Make cache import non-fatal and ensure export runs

Export cache on every build and treat a missing import as a warm-up miss, not a failure.

Terminal
docker buildx build \
  --cache-from type=registry,ref=ghcr.io/myorg/api:buildcache \
  --cache-to type=registry,ref=ghcr.io/myorg/api:buildcache,mode=max \
  --push -t ghcr.io/myorg/api:1.4.2 .

Align cache-from and cache-to tags

  1. Use the identical registry ref for both --cache-from and --cache-to.
  2. Confirm the producing job has push permission to the cache repo.
  3. Exempt the cache tag from aggressive retention pruning.

How to prevent it

  • Always pair --cache-from with a matching --cache-to so the cache gets created.
  • Use a stable cache tag and keep it out of retention sweeps.
  • Expect (and tolerate) a cache miss on the first build of a new ref.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →