Cyber Monday 2024! 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:

Nieves
2 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
2 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
2 months 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
2 months 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
1 months ago
E) test in the directory holding the Dockerfile.
upvoted 0 times
...
Jacquline
1 months ago
D) /tmp/test on the system running docker build.
upvoted 0 times
...
Princess
1 months ago
C) /test within the container image.
upvoted 0 times
...
Delisa
2 months ago
B) /root/tesc within the container image.
upvoted 0 times
...
Levi
2 months ago
A) /ting/test within the container image.
upvoted 0 times
...
...
Izetta
2 months ago
I'm not sure, but I think it might be in /ting/test within the container image.
upvoted 0 times
...
Tasia
2 months ago
I believe it's actually in /tmp/test on the system running docker build.
upvoted 0 times
...
Shelba
3 months ago
I think the file test is located in /tmp/test.
upvoted 0 times
...
Claribel
3 months 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
1 months ago
D) /tmp/test on the system running docker build.
upvoted 0 times
...
Arthur
1 months ago
C) /test within the container image.
upvoted 0 times
...
Juan
1 months ago
B) /root/tesc within the container image.
upvoted 0 times
...
Herman
1 months ago
A) /ting/test within the container image.
upvoted 0 times
...
Serina
3 months ago
D) /tmp/test on the system running docker build.
upvoted 0 times
...
Mirta
3 months ago
A) /ting/test within the container image.
upvoted 0 times
...
...

Save Cancel