Intermediate
Docker & Containers
Q41 / 100
What is a "multi-stage build" in Docker, and why is it useful?
Correct! Well done.
Incorrect.
The correct answer is B) A Dockerfile technique using multiple FROM statements where artifacts from earlier stages can be copied into later stages, allowing build tools to be excluded from the final image to reduce its size
B
Correct Answer
A Dockerfile technique using multiple FROM statements where artifacts from earlier stages can be copied into later stages, allowing build tools to be excluded from the final image to reduce its size
Explanation
Multi-stage builds let you compile/build in one stage (with full toolchains) and copy only the final artifacts into a minimal runtime stage, significantly reducing the final image size.
Progress
41/100