DCA · Question #127
Is this an advantage of multi-stage builds? Solution: optimizes Images by copying artifacts selectively from previous stages
The correct answer is A. Yes. Multi-stage Docker builds optimize image size by allowing only the necessary final artifacts from earlier stages to be copied into a lean production image.
Question
Is this an advantage of multi-stage builds? Solution: optimizes Images by copying artifacts selectively from previous stages
Options
- AYes
- BNo
How the community answered
(43 responses)- A88% (38)
- B12% (5)
Why each option
Multi-stage Docker builds optimize image size by allowing only the necessary final artifacts from earlier stages to be copied into a lean production image.
Multi-stage Docker builds significantly optimize image size by allowing only the essential build artifacts from an earlier stage (which may contain many build tools and dependencies) to be copied into a separate, final, and much smaller production image.
This is one of the core advantages of multi-stage builds, enabling developers to create smaller and more efficient Docker images for deployment.
Concept tested: Docker multi-stage builds for image optimization
Source: https://docs.docker.com/build/building/multi-stage/
Topics
Community Discussion
No community discussion yet for this question.