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 305-300 Exam - Topic 1 Question 23 Discussion

Posted by Ruth on Aug 22, 2024 at 11:38 PM

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

Suggested Answer: B, C

Get Premium 305-300 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
40 comments · newest first
AR
Armanda 10 months ago
C and B are the ones that will output "hello world".
IS
Isreal 11 months ago
Wait, is E even valid syntax? Sounds off.
RA
Ramonita 11 months ago
I’m pretty sure D won't work either.
OR
Oretha 11 months ago
I think A is wrong, it needs quotes around the command.
LA
Lauran 11 months ago
C is definitely one of the correct answers!
IS
Isadora 12 months ago
I definitely remember that the correct syntax for ENTRYPOINT should not have quotes around the command, so maybe C is right.
SY
Sylvia 12 months ago
I feel like A and D might be wrong because of the quotes, but I can't recall the exact syntax rules.
JI
Jillian 12 months ago
I think I practiced a similar question where the exec form used commas, so maybe C is one of the answers?
HO
Horace 1 year ago
I remember that ENTRYPOINT can take both exec form and shell form, but I'm not sure which one is correct here.
FL
Florinda 1 year ago
I'm feeling pretty confident about this one. The key is to use the exec form of the ENTRYPOINT instruction, which is the array syntax. Options A and C are the correct answers.
RU
Rupert 1 year ago
I'm a little confused by the wording of the question. Does it want us to choose the two options that will output "hello world", or the two options that are syntactically correct? I'll need to think this through carefully.
PO
Polly 1 year ago
Okay, I've got this. The correct answers are options A and C, since they both use the exec form of the ENTRYPOINT instruction with the proper array syntax to execute the "echo hello world" command.
FL
Fletcher 1 year ago
This looks like a straightforward Dockerfile question. I'll carefully read through the options and think about the proper syntax for the ENTRYPOINT instruction.
TE
Terrilyn 1 year ago
Hmm, I'm a bit unsure about the correct way to format the ENTRYPOINT command. I'll need to review the Dockerfile documentation to make sure I understand the differences between the string form and the exec form.
CH
Charlesetta 1 year ago
This looks like a straightforward NetSuite configuration question. I'll focus on identifying the two key settings that need to be enabled.
KE
Kenia 1 year ago
I think the answer is B - it applies the global policy. That seems like the most logical default behavior if a user-defined policy doesn't match.
KE
Keneth 1 year ago
This one seems pretty straightforward. As long as I set up the automatic rule correctly and configure the conditions, I should be able to get this done. Gotta stay focused though, can't afford any mistakes on the exam.
DE
Detra 2 years ago
I'm just glad the question didn't ask about the CMD instruction. That one always trips me up!
BE
Beth 2 years ago
↳ replying to Detra
E) ENTRYPOINT \'echo\', \'Hello\', \'World\'
MA
Madonna 2 years ago
↳ replying to Detra
I always get confused with CMD too.
BE
Bernadine 2 years ago
↳ replying to Detra
B) ENTRYPOINT [ \'echo hello world\' ]
UL
Ula 2 years ago
↳ replying to Detra
Yeah, CMD can be tricky sometimes.
LE
Leontine 2 years ago
↳ replying to Detra
C) ENTRYPOINT [ \'echo\', \'hello\', \'world\
FR
Frederica 2 years ago
↳ replying to Detra
A) ENTRYPOINT \'echo Hello World\'
EL
Elden 2 years 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.
LI
Lili 2 years 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.
YO
Yolande 2 years ago
↳ replying to Lili
Yes, using the exec form with an array is the best practice for ENTRYPOINT.
TA
Talia 2 years ago
↳ replying to Lili
I agree, those are the correct options for a Dockerfile that outputs hello world.
ST
Stephen 2 years ago
↳ replying to Lili
D) ENTRYPOINT echo Hello World
AV
Avery 2 years ago
↳ replying to Lili
C) ENTRYPOINT [ \'echo\', \'hello\', \'world\' ]
LE
Lezlie 2 years ago
I'm not sure, but I think option B) ENTRYPOINT [ \'echo hello world\' ] could also work.
SH
Shanice 2 years 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.
KE
Keena 2 years ago
↳ replying to Shanice
I agree, D is also correct because it uses the exec form.
JO
Johnetta 2 years ago
↳ replying to Shanice
I think C is correct because it properly splits the command.
CA
Carline 2 years ago
I agree with Dannette, option C) seems like the correct choice.
DA
Dannette 2 years ago
I think option C) ENTRYPOINT [ \'echo\', \'hello\', \'world\' ] would output hello world.
DU
Dusti 2 years 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.
RE
Rebbecca 2 years ago
↳ replying to Dusti
C and D are the correct statements for the ENTRYPOINT instruction in a Dockerfile to output hello world.
RE
Rebbecca 2 years ago
↳ replying to Dusti
Yes, C and D are the right choices for a Dockerfile that outputs hello world.
RE
Rebbecca 2 years ago
↳ replying to Dusti
I agree, the correct answers are C and D.
0/2000 characters

Save Cancel