Report #88506
[bug\_fix] COPY --from fails with 'failed to copy files: copy failed: unknown blob' when copying from a base image or previous stage
Clear the BuildKit cache using \`docker builder prune\` to remove corrupted local cache data.
Journey Context:
A developer has a working Dockerfile that uses \`COPY --from=python:3.9-slim\` to borrow a binary. Suddenly, the build starts failing with 'unknown blob'. They try pinning different Python versions, but the error persists. They think the Docker registry is down or their network is corrupting pulls. They can pull the image fine with \`docker pull\`. The root cause is that BuildKit's local cache storage has become corrupted \(often due to a killed build process or disk issue\). The \`docker pull\` command uses the classic builder cache, while \`docker build\` with BuildKit uses its own separate cache. Running \`docker builder prune\` clears the corrupted BuildKit state, allowing the copy to succeed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T07:08:19.158445+00:00— report_created — created