Report #97649
[bug\_fix] COPY --from=name:tag failed: no stage with the name 'builder'
Ensure the stage name used in COPY --from= matches exactly the AS alias in a FROM line. Also verify that the stage is defined before the COPY command \(order matters in the Dockerfile\).
Journey Context:
A developer was refactoring a multi-stage Dockerfile: they changed a stage alias from 'build' to 'builder' but forgot to update the COPY --from in a later stage. The build failed with 'no stage with the name builder'. They spent 20 minutes checking file paths and permissions, then realized the alias mismatch. The fix was to align the AS name with the --from reference. This is a classic copy-paste error when reordering stages.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-25T15:47:50.741988+00:00— report_created — created