exam questions

Exam 70-486 All Questions

View all questions & answers for the 70-486 exam

Exam 70-486 topic 1 question 135 discussion

Actual exam question from Microsoft's 70-486
Question #: 135
Topic #: 1
[All 70-486 Questions]

DRAG DROP -
You plan to deploy an ASP.NET Core MVC web application to a Docker container. The root folder for the web application folder has a Windows PowerShell script named publish.ps1. The script contains the following code:

You need to ensure that the Docker container can be deployed.
How should you complete the code? To answer, drag the appropriate code segments to the correct locations. Each code segment may be used once, more than once or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Example:

FROM microsoft/aspnetcore -

WORKDIR /app -
COPY --from=builder /app .
ENTRYPOINT ["dotnet", "myapp.dll"]

Box 1: aspnetcore -
From the DockerFile, you specify what base Docker image you'll be using (like using "FROM microsoft/dotnet:1.0.0-core").
Box 2: env:BuildType$

Box 3: dotnet -
Reference:
https://github.com/aspnet/aspnet-docker/blob/master/README.aspnetcore-build.md

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
Gorilla
Highly Voted 5 years, 6 months ago
1) The reference mentioned in the answet no longer exists. The closest resource I've found is: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/docker/building-net-docker-images?view=aspnetcore-3.1#build-and-deploy-manually 2) The source image name might also have changed 3) According to the dockerfile reference (https://docs.docker.com/engine/reference/builder/#environment-replacement), I would expect the environment variable to be placed as $BuildType or ${BuildType}, but there is no such answer
upvoted 7 times
zimzimzimma
5 years, 1 month ago
Thanks, another botched question. I would have chosen ${BuildType} as well but it wasn't there so I chose {BuildType}$... which was supposed to be wrong.
upvoted 1 times
...
...
Xzibit23
Most Recent 4 years, 5 months ago
Its an Core MVC web application so 1) aspnetcore 2) {env:BuildType} 3) docker Another similar case from microsoft referece: FROM microsoft/aspnetcore:2.0-nanoserver-sac2016 ARG source WORKDIR /app COPY ${source:-obj/Docker/publish} . ENTRYPOINT ["dotnet", "HelloDockerTools.dll"]
upvoted 1 times
...
slobex
4 years, 8 months ago
UR: https://github.com/aspnet/aspnet-docker/
upvoted 1 times
AMUJ12
4 years, 8 months ago
Are the given answer correct ?
upvoted 1 times
...
...
Mayflower
4 years, 11 months ago
https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/docker/visual-studio-tools-for-docker?view=aspnetcore-3.1
upvoted 1 times
...
mr_
5 years ago
Guys, just to confirm what you said: 'Environment variables are notated in the Dockerfile either with $variable_name or ${variable_name}'. Ref: https://docs.docker.com/engine/reference/builder/#environment-replacement
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 ...