Report #102872
[bug\_fix] COPY --from=my-stage: no such stage \(or stage my-stage not found\)
Verify that the stage name in \`COPY --from=\` exactly matches the name of a stage defined earlier in the Dockerfile. Stage names are case-sensitive and must be defined before the COPY instruction.
Journey Context:
While refactoring a multi-stage Dockerfile, a developer renamed the builder stage to 'compile' but forgot to update the corresponding \`COPY --from=builder\` statement. The build produced 'no such stage: builder'. The developer spent time checking BuildKit version and cache invalidation, but the root cause was a simple typo. After cross-referencing stage names, they corrected the name and the build succeeded. This error is especially common when stages are reordered or renamed during iterative development.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-09T15:48:28.567784+00:00— report_created — created