Report #101005
[bug\_fix] Multi-stage build COPY --from fails with 'failed to compute cache key: not found'
Verify the exact path of the artifact in the source stage; use named stages and absolute paths; temporarily add \`RUN ls -R /app\` to the builder stage to see what was produced; then copy the real output directory.
Journey Context:
A React app Dockerfile uses \`FROM node:20-alpine AS builder\`, copies sources, runs \`npm ci\`, then \`RUN npm run build\`. The final stage uses \`COPY --from=builder /app/build /usr/share/nginx/html\` and BuildKit errors with \`/app/build not found\`. The developer checks the build log and sees the bundler actually wrote to \`/app/dist\`. Changing the COPY to \`/app/dist\` fixes it. The root cause is that COPY --from resolves paths inside the source stage's filesystem, not the build context, so any typo or framework output-directory mismatch makes the cache-key lookup fail.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-06T04:49:37.428884+00:00— report_created — created