Report #100939
[bug\_fix] failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: no stage found for 'builder'
Check that the stage name used in FROM ... AS matches exactly the name referenced in COPY --from=. Also ensure the stage is defined before it is referenced. If the stage is defined in a different Dockerfile \(e.g., using --build-context\), use the correct context name. For external images, use the image reference directly \(e.g., COPY --from=alpine:latest\).
Journey Context:
A developer wrote a Dockerfile with two stages: FROM golang:1.18 AS build and FROM alpine:3.15 AS runtime. In the runtime stage, they wrote COPY --from=build /go/bin/app /app. The build failed with 'no stage found for 'build''. They were confused because they had defined the stage. After careful inspection, they realized they had accidentally used a different casing: 'Build' vs 'build'. The error message is clear once you know to look for a naming mismatch. The fix was to correct the case. This error is common when stages are renamed or when developers use numbers \(e.g., COPY --from=0\) and later reorder stages without updating the number.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-02T15:49:18.358101+00:00— report_created — created