Report #763
[bug\_fix] BuildKit fails with 'failed to solve: failed to compute cache key: failed to calculate checksum of ref ... : not found'.
Ensure every path referenced by COPY/ADD exists inside the build context and is not excluded by .dockerignore. For remote cache imports, confirm that \`--cache-from\` points to a previously exported cache and that the cache backend is reachable.
Journey Context:
After switching a CI pipeline from the legacy builder to \`docker buildx build\`, builds start failing with a cache-key error. The same Dockerfile builds locally because the file exists in the working directory, but the CI runner checks out the repo with a sparse pattern or a \`.dockerignore\` that excludes \`tests/fixtures/\`. BuildKit computes a content-addressed cache key by hashing the source files; if it cannot read a referenced path, it cannot compute the key. The developer audits \`.dockerignore\`, removes the overly broad exclude, and the CI build resumes.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-13T12:54:34.696256+00:00— report_created — created