exam questions

Exam AZ-400 All Questions

View all questions & answers for the AZ-400 exam

Exam AZ-400 topic 7 question 33 discussion

Actual exam question from Microsoft's AZ-400
Question #: 33
Topic #: 7
[All AZ-400 Questions]

You plan to create an image that will contain a .NET Core application.
You have a Dockerfile file that contains the following code. (Line numbers are included for reference only.)

You need to ensure that the image is as small as possible when the image is built.
Which line should you modify in the file?

  • A. 1
  • B. 3
  • C. 4
  • D. 7
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
artisticcheese
Highly Voted 5 years ago
Correct answer is 4. Final image shall not be sdk but runtime image
upvoted 92 times
...
coma74
Highly Voted 4 years, 9 months ago
I agree correct answer is 4 because the production runtime doesn't include a sdk.
upvoted 16 times
...
4bd3116
Most Recent 7 months ago
Selected Answer: C
line 04, change from using the SDK image to using a runtime image.
upvoted 1 times
...
ozbonny
9 months, 2 weeks ago
Selected Answer: C
Line 4 wrong
upvoted 1 times
...
Hillah
10 months, 3 weeks ago
line 4
upvoted 1 times
...
vsvaid
11 months, 3 weeks ago
Selected Answer: C
Line 4
upvoted 1 times
...
yana_b
1 year, 2 months ago
Selected Answer: C
This question is the same as question 25
upvoted 1 times
...
syu31svc
2 years, 4 months ago
Selected Answer: C
Why do you need sdk twice? Answer is C
upvoted 3 times
...
UnknowMan
2 years, 7 months ago
Selected Answer: C
Use a runtime image not a Sdk image to run the app
upvoted 1 times
...
rdemontis
2 years, 8 months ago
Selected Answer: C
correct answer is C. You don't need to use the SDK to run the application. You only need the runtime.
upvoted 2 times
...
lugospod
2 years, 10 months ago
Got this January 2022.
upvoted 4 times
...
cirojascr
2 years, 10 months ago
Selected Answer: C
Correct is line 4, should be taken the runtime environment image
upvoted 1 times
...
Sara_Mo
2 years, 10 months ago
Selected Answer: C
Correct answer is line 4. Final image shall not be sdk but runtime image
upvoted 1 times
...
rliberoff
2 years, 11 months ago
Selected Answer: C
It does not make sense to remove the SDK!!! How do you build then? Come on @ExamTopics, it is obvious that the correct answer is C, line 04! FIX THIS!
upvoted 1 times
...
arpi79
2 years, 12 months ago
Selected Answer: C
Correct answer is line 4. Final image shall not be sdk but runtime image
upvoted 1 times
...
AndyPix
2 years, 12 months ago
Selected Answer: C
Must use runtime, not sdk at line 4
upvoted 1 times
...
Keem
3 years, 2 months ago
The end result is the same tiny production image as before, with a significant reduction in complexity. You don’t need to create any intermediate images and you don’t need to extract any artifacts to your local system at all. How does it work? The second FROM instruction starts a new build stage with the alpine:latest image as its base. The COPY --from=0 line copies just the built artifact from the previous stage into this new stage. The Go SDK and any intermediate artifacts are left behind, and not saved in the final image.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...