Is this an advantage of multi-stage builds?
Is this an advantage of multi-stage builds?
Solution: optimizes Images by copying artifacts selectively from previous stages
A . Yes
B . No
Answer: A
Explanation:
Multi-stage builds are a feature of Docker that allows you to use multiple FROM statements in your Dockerfile. Each FROM statement creates a new stage of the build, which can use a different base image and run different commands. You can then copy artifacts from one stage to another, leaving behind everything you don’t want in the final image. This optimizes the image size and reduces the attack surface by removing unnecessary dependencies and tools. For example, you can use a stage to compile your code, and then copy only the executable file to the final stage, which can use a minimal base image like scratch. This way, you don’t need to include the compiler or the source code in the final image.
Reference: Multi-stage builds | Docker Docs
What Are Multi-Stage Docker Builds? – How-To Geek
Multi-stage | Docker Docs
Latest DCA Dumps Valid Version with 55 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund