Report #100075
[bug\_fix] failed to solve: failed to compute cache key: failed to calculate checksum of ref : "/app/config.json": not found
Ensure the source path of every COPY/ADD exists in the build context at the moment the instruction runs. Do not rely on files created by earlier RUN steps unless they are in the same layer; COPY sources must exist in the client-side build context. Verify with \`docker buildx build --progress=plain\` to see the exact failing instruction.
Journey Context:
You have a Dockerfile that does \`COPY package\*.json ./\` followed by \`RUN npm ci\`. Later you add \`COPY config.json ./\` after an npm install. With BuildKit, you get a cryptic 'failed to compute cache key' rather than the old 'no such file' error. You suspect cache corruption and run \`docker builder prune\`. The error persists. The real issue is that \`config.json\` is in \`.dockerignore\` or you are building from a context that doesn't include it. BuildKit calculates source checksums before executing the layer; if the source is missing, it cannot compute the cache key.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-01T04:36:50.065390+00:00— report_created — created