exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 28 question 1 discussion

Actual exam question from Microsoft's AZ-204
Question #: 1
Topic #: 28
[All AZ-204 Questions]

DRAG DROP -
You need to deploy a new version of the LabelMaker application to ACR.
Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Step 1: Build a new application image by using dockerfile
Step 2: Create an alias if the image with the fully qualified path to the registry
Before you can push the image to a private registry, you've to ensure a proper image name. This can be achieved using the docker tag command. For demonstration purpose, we'll use Docker's hello world image, rename it and push it to ACR.
# pulls hello-world from the public docker hub
$ docker pull hello-world
# tag the image in order to be able to push it to a private registry
$ docker tag hello-word <REGISTRY_NAME>/hello-world
# push the image
$ docker push <REGISTRY_NAME>/hello-world
Step 3: Log in to the registry and push image
In order to push images to the newly created ACR instance, you need to login to ACR form the Docker CLI. Once logged in, you can push any existing docker image to your ACR instance.
Scenario:
Coho Winery plans to move the application to Azure and continue to support label creation.

LabelMaker app -
Azure Monitor Container Health must be used to monitor the performance of workloads that are deployed to Kubernetes environments and hosted on Azure
Kubernetes Service (AKS).
You must use Azure Container Registry to publish images that support the AKS deployment.
Reference:
https://thorsten-hans.com/how-to-use-a-private-azure-container-registry-with-kubernetes-9b86e67b93b6 https://docs.microsoft.com/en-us/azure/container-registry/container-registry-tutorial-quick-task

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
SivajiTheBoss
Highly Voted 2 years, 7 months ago
Correct answer given. Step 1: Build a new application image by using dockerfile FROM node:8.9.3-alpine RUN mkdir -p /usr/src/app COPY ./app/ /usr/src/app/ WORKDIR /usr/src/app RUN npm install CMD node /usr/src/app/index.js docker build ./aci-helloworld -t aci-test-app docker images docker run -d -p 8080:80 aci-test-app (Example to build image only and run locally) Step 2: Create an alias if the image with the fully qualified path to the registry docker tag mcr.microsoft.com/oss/nginx/nginx:1.15.5-alpine myregistry.azurecr.io/samples/nginx Step 3: Log in to the registry and push image docker push myregistry.azurecr.io/samples/nginx
upvoted 27 times
OPT_001122
1 year, 11 months ago
nice explanation
upvoted 1 times
...
...
jay158
Highly Voted 3 years, 3 months ago
Correct https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-docker-cli?tabs=azure-cli
upvoted 10 times
AnKiLa
3 years, 3 months ago
Agree But it's an update - so this link looks better for me: https://docs.microsoft.com/en-us/azure/container-registry/container-registry-tutorial-deploy-update
upvoted 3 times
...
...
whiteblack
Most Recent 1 year, 9 months ago
Very Useful.
upvoted 1 times
...
gmishra88
2 years ago
You could still alias with a new build number, but yeah, not required. And, yes, the version can be a build number. But if only three can be chosen I will not select that
upvoted 1 times
...
meoukg
2 years, 7 months ago
Got it on 03/2022, I chose as below: Step 1: Build a new application image by using dockerfile Step 2: Create an alias if the image with the fully qualified path to the registry Step 3: Log in to the registry and push image
upvoted 3 times
...
mc0re
3 years, 2 months ago
Strange question. I realize that from the provided options this is the only solution one can assemble. But the project describes LabelMaker app to be a set of images running in AKS. Pushing a new image into ACR won't change a thing, as one needs to update the YAML deployment file for Kubernetes to pick up the image, and then tell AKS to reconcile.
upvoted 4 times
gmishra88
2 years ago
It is a Microsoft question. Keep intelligence out of it
upvoted 8 times
...
fuji36850
5 months, 2 weeks ago
Question says "You need to deploy ...to ACR" - ACR is the registry - it does exactly that. Question does not say, that you need to update production containers.
upvoted 1 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago