Show the pattern: "Build stage installs dependencies and compiles. Production stage starts from a minimal image and copies only the binary or build output. My Go images go from 1.2GB with the toolchain to 15MB with just the binary on scratch."
Multi-stage builds use multiple FROM instructions. Earlier stages install build tools, compile code, and run tests. The final stage copies only the compiled artifacts into a minimal base image. Benefits: the production image contains no build tools, compilers, source code, or dev dependencies — dramatically reducing image size and attack surface. Example: stage 1 uses node:20 to npm install and npm run build, stage 2 uses nginx:alpine and copies only the dist/ folder. Strong candidates discuss: naming stages (FROM golang:1.22 AS builder), copying between stages (COPY --from=builder), using build stages for running tests in CI, and the security benefit of excluding source code from production images.
Essential for production Docker usage. Candidates shipping images with build tools and source code are creating bloated, insecure images. Those who use multi-stage builds demonstrate understanding of the production container lifecycle.