Beginner Docker & Containers
Q35 / 100

What is the typical purpose of the "RUN" instruction in a Dockerfile?

Correct! Well done.

Incorrect.

The correct answer is B) To execute a command during the image build process, creating a new layer with the result (e.g. installing packages)

B

Correct Answer

To execute a command during the image build process, creating a new layer with the result (e.g. installing packages)

Explanation

RUN executes commands at build time (like "apt-get install"), and the result is committed as a new image layer; this differs from CMD/ENTRYPOINT which run at container startup.

Progress
35/100