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 1 Question 33 Discussion

Actual exam question for LPI's 305-300 exam
Question #: 33
Topic #: 1
[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:

Effie
3 days ago
I'm pretty sure the file is in /tmp/test. The WORKDIR / command sets the working directory to the root, but the RUN cd /tmp command changes it to /tmp before creating the test file.
upvoted 0 times
...
Sarina
20 days ago
Hmm, I see your point. But I still think it's in /tmp/test because of the RUN cd /tmp command.
upvoted 0 times
...
Tiffiny
23 days ago
I disagree, I believe the file test is located in /test within the container image.
upvoted 0 times
...
Sarina
24 days ago
I think the file test is located in /tmp/test.
upvoted 0 times
...
Armando
28 days ago
The file test should be located in the /tmp directory within the container image. The RUN cd /tmp command changes the working directory to /tmp before the echo test > test command is executed.
upvoted 0 times
Blossom
6 days ago
B) /root/tesc within the container image.
upvoted 0 times
...
Nelida
10 days ago
A) /ting/test within the container image.
upvoted 0 times
...
...

Save Cancel