ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 7 - DCA discussion

Report
Export

Is this an advantage of multi-stage builds?

Solution: better caching when building Docker images

A.

Yes

Answers
A.

Yes

B.

No

Answers
B.

No

Suggested answer: A

Explanation:

Better caching when building Docker images is an advantage of multi-stage builds.Multi-stage builds allow you to use multiple FROM statements in your Dockerfile, each starting a new stage of the build1.This can help you improve the caching efficiency of your Docker images, as each stage can use its own cache layer2.For example, if you have a stage that installs dependencies and another stage that compiles your code, you can reuse the cached layer of the dependencies stage if they don't change, and only rebuild the code stage if it changes2. This can save you time and bandwidth when building and pushing your images.Reference:

Multi-stage builds | Docker Docs

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

asked 08/11/2024
Rafal Wozniak
37 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first