Interview Prep/Docker/Build failures and cache problems

Multi-stage build error: `COPY --from=builder /app/dist ...: not found`

IntermediateTroubleshootingBuild failures and cache problems
Answer

Likely causes → Wrong path in builder, build step silently output elsewhere, stage name typo, or different WORKDIR.

Diagnose →

docker build --target builder -t dbg .
docker run --rm dbg find / -name dist -maxdepth 4

Fix → Correct the path or WORKDIR; fail the build if artifacts are missing (RUN test -f /app/dist/index.js).

Prevent → Add artifact checks after build steps.

All Docker questions Roadmap: Docker & containers

More on Build failures and cache problems