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 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
2 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
12 days ago
E) ENTRYPOINT \'echo\', \'Hello\', \'World\'
upvoted 0 times
...
Madonna
13 days ago
I always get confused with CMD too.
upvoted 0 times
...
Bernadine
14 days ago
B) ENTRYPOINT [ \'echo hello world\' ]
upvoted 0 times
...
Ula
16 days ago
Yeah, CMD can be tricky sometimes.
upvoted 0 times
...
Leontine
18 days ago
C) ENTRYPOINT [ \'echo\', \'hello\', \'world\
upvoted 0 times
...
Frederica
21 days ago
A) ENTRYPOINT \'echo Hello World\'
upvoted 0 times
...
...
Elden
2 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
2 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
30 days ago
Yes, using the exec form with an array is the best practice for ENTRYPOINT.
upvoted 0 times
...
Talia
1 months ago
I agree, those are the correct options for a Dockerfile that outputs hello world.
upvoted 0 times
...
Stephen
1 months ago
D) ENTRYPOINT echo Hello World
upvoted 0 times
...
Avery
2 months ago
C) ENTRYPOINT [ \'echo\', \'hello\', \'world\' ]
upvoted 0 times
...
...
Lezlie
2 months ago
I'm not sure, but I think option B) ENTRYPOINT [ \'echo hello world\' ] could also work.
upvoted 0 times
...
Shanice
2 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
1 months ago
I agree, D is also correct because it uses the exec form.
upvoted 0 times
...
Johnetta
2 months ago
I think C is correct because it properly splits the command.
upvoted 0 times
...
...
Carline
2 months ago
I agree with Dannette, option C) seems like the correct choice.
upvoted 0 times
...
Dannette
2 months ago
I think option C) ENTRYPOINT [ \'echo\', \'hello\', \'world\' ] would output hello world.
upvoted 0 times
...
Dusti
3 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
2 months ago
C and D are the correct statements for the ENTRYPOINT instruction in a Dockerfile to output hello world.
upvoted 0 times
...
Rebbecca
2 months ago
Yes, C and D are the right choices for a Dockerfile that outputs hello world.
upvoted 0 times
...
Rebbecca
2 months ago
I agree, the correct answers are C and D.
upvoted 0 times
...
...

Save Cancel