CK.I · CKAD practice question
You need to build an OCI container image from a Dockerfile that installs build tools in stage one and copies only the compiled Go binary into a minimal scratch base image in stage two. Which Dockerfile instruction copies the artifact from the first stage?
Check answer and explanation
Correct answer: COPY --from=builder /app/server /server
Explanation
Multi-stage Docker builds use COPY --from= to transfer build artifacts from an earlier stage into a later stage while keeping final images small.
Common trap
Multi-stage Docker builds use COPY --from= to transfer build artifacts from an earlier stage into a later stage while keeping final images small.
Source: Original unofficial practice; not an official CKAD exam item
Checked against the cited text on 2026-11-30.