ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 439 - DOP-C01 discussion

Report
Export

You are building a Docker image with the following Dockerfile. How many layers will the resulting image have? FROM scratch

CMD /app/hello.sh

A.
2
Answers
A.
2
B.
4
Answers
B.
4
C.
1
Answers
C.
1
D.
3
Answers
D.
3
Suggested answer: D

Explanation:

FROM scratch

CMD /app/hello.sh

The image contains all the layers from the base image (only one in this case, since we're building rom scratch), plus a new layer with the CMD instruction, and a read-write container layer.

Reference: https://docs.docker.com/engine/userguide/storagedriver/imagesandcontainers/#sharingpromotes-smaller-images

asked 16/09/2024
Vijay Khara
43 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first