Basic Dockerfile quiz. Follow up quiz part of the Introduction to Docker blog post series part 4.


Question 1

Correct Answers: 1/4

What is the purpose of the `FROM` instruction in a Dockerfile?


Question 2

Correct Answers: 1/4

What is the function of the `RUN` instruction in a Dockerfile?


Question 3

Correct Answers: 1/4

Which Dockerfile instruction specifies the default command to run when a container starts?


Question 4

Correct Answers: 1/4

What is the purpose of the `WORKDIR` instruction in a Dockerfile?


Question 5

Correct Answers: 1/4

Which instruction in a Dockerfile copies files from the host into the image?


Question 6

Correct Answers: 1/4

What is the difference between `COPY` and `ADD` in a Dockerfile?


Question 7

Correct Answers: 1/4

Which instruction in a Dockerfile defines environment variables?


Question 8

Correct Answers: 1/4

What is the purpose of the `EXPOSE` instruction in a Dockerfile?


Question 9

Correct Answers: 1/4

Which instruction in a Dockerfile can be used to specify a default executable that always runs in the container?


Question 10

Correct Answers: 1/4

What is the correct syntax for using the `COPY` instruction in a Dockerfile?


Finish Quiz