Report #35192
[bug\_fix] COPY --from=builder failed: file not found in build stage
Verify the exact output path of the build tool in the builder stage and ensure the \`COPY --from\` instruction references that absolute or working-directory-relative path correctly.
Journey Context:
A developer writes a multi-stage Go build. The first stage is \`FROM golang AS builder\` with \`RUN go build -o myapp .\`. The second stage is \`FROM alpine\` with \`COPY --from=builder /go/bin/myapp /usr/local/bin/myapp\`. The build fails with 'file not found in build stage'. The developer assumes the Go build failed silently. They run an interactive container from the builder stage and \`ls /go/bin/\`, finding it empty. They realize \`go build -o myapp .\` outputs to the current working directory \(\`/app/myapp\`\), not the default \`$GOPATH/bin\`. The fix is to change the COPY source to \`/app/myapp\` or use an absolute path in the \`go build\` command.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T13:32:50.285908+00:00— report_created — created