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

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

Which of the following statements in a Dockerfile leads to a container which outputs hello world? (Choose two.)

Show Suggested Answer Hide Answer
Suggested Answer: B, C

Contribute your Thoughts:

Detra
3 months ago
I'm just glad the question didn't ask about the CMD instruction. That one always trips me up!
upvoted 0 times
Beth
1 months ago
E) ENTRYPOINT \'echo\', \'Hello\', \'World\'
upvoted 0 times
...
Madonna
1 months ago
I always get confused with CMD too.
upvoted 0 times
...
Bernadine
1 months ago
B) ENTRYPOINT [ \'echo hello world\' ]
upvoted 0 times
...
Ula
2 months ago
Yeah, CMD can be tricky sometimes.
upvoted 0 times
...
Leontine
2 months ago
C) ENTRYPOINT [ \'echo\', \'hello\', \'world\
upvoted 0 times
...
Frederica
2 months ago
A) ENTRYPOINT \'echo Hello World\'
upvoted 0 times
...
...
Elden
3 months ago
C and D are the way to go. I'm surprised that option E has 'World*' instead of 'World'. That's a bit of a giveaway that it's not correct.
upvoted 0 times
...
Lili
3 months ago
I was a bit confused at first, but now I see that C and D are the way to go. The exec form is the way to go for ENTRYPOINT.
upvoted 0 times
Yolande
2 months ago
Yes, using the exec form with an array is the best practice for ENTRYPOINT.
upvoted 0 times
...
Talia
2 months ago
I agree, those are the correct options for a Dockerfile that outputs hello world.
upvoted 0 times
...
Stephen
2 months ago
D) ENTRYPOINT echo Hello World
upvoted 0 times
...
Avery
3 months ago
C) ENTRYPOINT [ \'echo\', \'hello\', \'world\' ]
upvoted 0 times
...
...
Lezlie
3 months ago
I'm not sure, but I think option B) ENTRYPOINT [ \'echo hello world\' ] could also work.
upvoted 0 times
...
Shanice
3 months ago
I agree with Dusti. C and D are the correct answers. The other options don't use the exec form or don't properly split the command.
upvoted 0 times
Keena
2 months ago
I agree, D is also correct because it uses the exec form.
upvoted 0 times
...
Johnetta
3 months ago
I think C is correct because it properly splits the command.
upvoted 0 times
...
...
Carline
3 months ago
I agree with Dannette, option C) seems like the correct choice.
upvoted 0 times
...
Dannette
3 months ago
I think option C) ENTRYPOINT [ \'echo\', \'hello\', \'world\' ] would output hello world.
upvoted 0 times
...
Dusti
4 months ago
I think the correct answers are C and D. The ENTRYPOINT instruction in a Dockerfile should be in the exec form, which is a JSON array, and the command should be split into individual elements.
upvoted 0 times
Rebbecca
3 months ago
C and D are the correct statements for the ENTRYPOINT instruction in a Dockerfile to output hello world.
upvoted 0 times
...
Rebbecca
3 months ago
Yes, C and D are the right choices for a Dockerfile that outputs hello world.
upvoted 0 times
...
Rebbecca
3 months ago
I agree, the correct answers are C and D.
upvoted 0 times
...
...

Save Cancel