Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

LPI Exam 305-300 Topic 4 Question 24 Discussion

Actual exam question for LPI's 305-300 exam
Question #: 24
Topic #: 4
[All 305-300 Questions]

If a Dockerfile contains the following lines:

WORKDIR /

RUN cd /tmp

RUN echo test > test

where is the file test located?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

King
3 days ago
Hmm, this one seems tricky. I'll need to carefully read through the Dockerfile instructions to figure out where the test file is located.
upvoted 0 times
...
Nieves
12 months ago
Ah, the age-old question of where the file test is located. It's like a game of hide-and-seek, but with Docker commands instead of children.
upvoted 0 times
...
Micaela
12 months ago
Haha, the file test is actually located in the secret dimension of the container, where it will only be visible to the chosen ones. All the other options are mere distractions!
upvoted 0 times
...
Lenita
1 years ago
I'm pretty sure the file test is located in /test within the container image. The WORKDIR command should have set the working directory to / before running the RUN commands.
upvoted 0 times
...
Raelene
1 years ago
Option D is correct. The RUN cd /tmp command changes the directory to /tmp, but it doesn't change the working directory. So, the file test is created in /tmp/test on the system running the Docker build.
upvoted 0 times
Johana
11 months ago
E) test in the directory holding the Dockerfile.
upvoted 0 times
...
Jacquline
11 months ago
D) /tmp/test on the system running docker build.
upvoted 0 times
...
Princess
11 months ago
C) /test within the container image.
upvoted 0 times
...
Delisa
12 months ago
B) /root/tesc within the container image.
upvoted 0 times
...
Levi
12 months ago
A) /ting/test within the container image.
upvoted 0 times
...
...
Izetta
1 years ago
I'm not sure, but I think it might be in /ting/test within the container image.
upvoted 0 times
...
Tasia
1 years ago
I believe it's actually in /tmp/test on the system running docker build.
upvoted 0 times
...
Shelba
1 years ago
I think the file test is located in /tmp/test.
upvoted 0 times
...
Claribel
1 years ago
The file test is located in /tmp/test within the container image. The WORKDIR command sets the working directory to /, and the RUN cd /tmp command changes the directory to /tmp before running echo test > test.
upvoted 0 times
Vicente
11 months ago
D) /tmp/test on the system running docker build.
upvoted 0 times
...
Arthur
11 months ago
C) /test within the container image.
upvoted 0 times
...
Juan
11 months ago
B) /root/tesc within the container image.
upvoted 0 times
...
Herman
11 months ago
A) /ting/test within the container image.
upvoted 0 times
...
Serina
1 years ago
D) /tmp/test on the system running docker build.
upvoted 0 times
...
Mirta
1 years ago
A) /ting/test within the container image.
upvoted 0 times
...
...

Save Cancel