Beginner Docker & Containers
Q27 / 100

What does the Dockerfile instruction "WORKDIR" do?

Correct! Well done.

Incorrect.

The correct answer is A) Sets the working directory for subsequent instructions like RUN, CMD, COPY in the image

A

Correct Answer

Sets the working directory for subsequent instructions like RUN, CMD, COPY in the image

Explanation

WORKDIR sets (and creates if needed) the working directory inside the image for all following instructions, avoiding repeated absolute paths.

Progress
27/100