Which of the following statement is INCORRECT with respect to a Dockerfile?
A.
WORKDIR instruction sets the working directory for any RUN, CMD, ENTRYPOINT instructions and not for COPY and ADD instructions in the Dockerfile.
B.
An ENV instruction sets the environment value to the key, and it is available for the subsequent build steps and in the running container as well.
C.
The RUN instruction will execute any commands in a new layer on top of the current image and commit the results.
D.
If CMD instruction provides default arguments for the ENTRYPOINT instruction, both should be specified in JSON format.
The Answer Is:
A
This question includes an explanation.
Explanation:
The WORKDIR instruction sets the working directory for all subsequent RUN, CMD, ENTRYPOINT, COPY, and ADD instructions in the Dockerfile. This means that after specifying WORKDIR, all these instructions will use the specified directory as their current working directory.
1z0-1109-24 PDF/Engine
Printable Format
Value of Money
100% Pass Assurance
Verified Answers
Researched by Industry Experts
Based on Real Exams Scenarios
100% Real Questions
Get 65% Discount on All Products,
Use Coupon: "ac4s65"