Report #14821
[bug\_fix] failed to compute cache key: failed to walk /var/lib/docker/tmp/buildkit-mount...: no such file or directory
Verify the artifact path in the source stage. Ensure the build step in the previous stage actually created the file/directory at the expected path, and adjust the \`COPY --from=\` path accordingly.
Journey Context:
During a multi-stage build, a developer uses \`COPY --from=builder /app/dist /usr/share/nginx/html\` in the final stage. BuildKit throws a cryptic 'failed to compute cache key' or 'file not found' error pointing to a buildkit-mount directory. The developer assumes the base image or BuildKit is broken. To debug, they add a \`RUN ls -l /app/dist\` step right before the COPY in the builder stage. The output reveals the build tool \(e.g., Vite or Webpack\) actually outputted to \`/app/build\` instead of \`/app/dist\`. The error wasn't a BuildKit bug; it was correctly stating the source path didn't exist in the intermediate stage. Changing the COPY destination to \`/app/build\` resolves the build.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T22:27:39.580109+00:00— report_created — created