Report #85922
[bug\_fix] COPY failed: not found or pull access denied for
Ensure the stage name in COPY --from= exactly matches the AS alias defined earlier in the Dockerfile, or verify the external image name and tag if copying from another image.
Journey Context:
A developer refactors a complex multi-stage Dockerfile to optimize build times. They rename the compilation stage from 'builder' to 'build-env' but forget to update the COPY --from=builder /app/out /app/ instruction in the final stage. The build fails with 'builder not found'. They go down a rabbit hole of checking build context, verifying file existence in the CI runner, and inspecting layer contents. They might even think the base image is missing the compilation tools. The error occurs because Docker tries to resolve 'builder' as an external image if it doesn't match a stage name, leading to a pull attempt that fails. Correcting the --from argument to match the new 'build-env' alias resolves the dependency resolution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:48:25.121065+00:00— report_created — created