ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 146 - DCA discussion

Report
Export

Is this an advantage of multi-stage builds?

Solution: faster image builds by allowing parallel execution of Docker builds

A.

Yes

Answers
A.

Yes

B.

No

Answers
B.

No

Suggested answer: B

Explanation:

= Simultaneously creating and tagging multiple images is not an advantage of multi-stage builds.Multi-stage builds are a feature that allows you to use multiple FROM statements in your Dockerfile, each starting a new stage of the build1. You can selectively copy artifacts from one stage to another, leaving behind everything you don't want in the final image.This helps you to optimize the size and security of your images, as well as to simplify your build process12. However, multi-stage builds do not create or tag multiple images at once.Each Dockerfile produces one final image, which is the result of the last stage in the Dockerfile1.If you want to create and tag multiple images from a single Dockerfile, you need to use the--targetoption with thedocker buildcommand, and specify the name of the stage you want to build and tag3.Reference:

Multi-stage builds | Docker Docs

What Are Multi-Stage Docker Builds? - How-To Geek

Stop at a specific build stage | Docker Docs

asked 08/11/2024
Cristian Pernia
42 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first