Docker Certified Associate (DCA) — Question 13
Is this an advantage of multi-stage builds?
better caching when building Docker images
Answer options
- A. Yes
- B. No
Correct answer: A
Explanation
The correct answer is A because multi-stage builds allow for more efficient caching by separating the build environment from the final image, which can help in reusing layers that haven't changed. Option B is incorrect as it suggests that there is no advantage in caching when using multi-stage builds, which contradicts the benefits they offer.