Given the following excerpt of a Dockerfile : Run apt-get -y update && apt-get install -y fortunes && apt-get clean Why are the multiple apt-get commands combined in one RUN statement instead of using multiple RUN statements?
A) To prevent the commands from running in parallel because Docker executes all RUN statements in their own container at the same time.
B) To ensure the execution order of the commands because Docker might evaluate the statements of a Dockerfile in any order. To ensure the execution order of the commands because Docker might evaluate the statements of a in any order.
C) To avoid the creation of unnecessary images because Docker creates a new image for each RUN statement. To avoid the creation of unnecessary images because Docker creates a new image for each RUN statement.
D) To execute both commands in the same container instance and void Docker to reset the container to the original base image.
E) To execute the apt-get install command only if the apt-get update command was successful because Docker does not check the success of RUN statements. To execute the apt-get install command only if the apt-get update command was successful because Docker does not check the success of statements.
Correct Answer:
Verified
Q9: Which of the following statements are true
Q10: The file index.php , which is being
Q11: If a Dockerfile references the container's base
Q12: Which of the following HTTP methods are
Q13: How is a Docker container image retrieved
Q15: What statement is true regarding the Swarm
Q16: Which of the following git commands is
Q17: Which of the log messages below matches
Q18: A Dockerfile contains the statements: COPY data/ /data/
Q19: Which of the following information is contained
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents