BlackFriday 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
29 days 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
30 days 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 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
1 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
Jacquline
5 days ago
D) /tmp/test on the system running docker build.
upvoted 0 times
...
Princess
8 days ago
C) /test within the container image.
upvoted 0 times
...
Delisa
17 days ago
B) /root/tesc within the container image.
upvoted 0 times
...
Levi
24 days ago
A) /ting/test within the container image.
upvoted 0 times
...
...
Izetta
1 months ago
I'm not sure, but I think it might be in /ting/test within the container image.
upvoted 0 times
...
Tasia
1 months ago
I believe it's actually in /tmp/test on the system running docker build.
upvoted 0 times
...
Shelba
2 months ago
I think the file test is located in /tmp/test.
upvoted 0 times
...
Claribel
2 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
10 days ago
D) /tmp/test on the system running docker build.
upvoted 0 times
...
Arthur
11 days ago
C) /test within the container image.
upvoted 0 times
...
Juan
12 days ago
B) /root/tesc within the container image.
upvoted 0 times
...
Herman
14 days ago
A) /ting/test within the container image.
upvoted 0 times
...
Serina
2 months ago
D) /tmp/test on the system running docker build.
upvoted 0 times
...
Mirta
2 months ago
A) /ting/test within the container image.
upvoted 0 times
...
...

Save Cancel