AZ-104 exam dumps

AZ-104 practice question 160 of 289

Microsoft Certified: Azure Administrator Associate. Associate level, Microsoft. Free question with the correct answer and a full explanation.

AZ-104 Question 160

Single answer

You have a container image named vantageco.azurecr.io/myapp:latest stored in a private Azure Container Registry (ACR) called vantageco. You need to deploy this container to Azure Container Instances (ACI) in the resource group MyResourceGroup, in the East US region, with 2 CPU cores, 3.5 GB of memory, and expose port 80 publicly. You also want the container to have a DNS name label (myapp-staging) so that it can be accessed securely over its own domain. You need to provide the ACR credentials for the container image. Which Azure CLI command best meets these requirements?

  1. A

    az container create --resource-group MyResourceGroup --name mycontainer --image vantageco.azurecr.io/myapp:latest --cpu 2 --memory 3.5 --ports 80 --dns-name-label myapp-staging --registry-login-server vantageco.azurecr.io --registry-username --registry-password --location eastus

  2. B

    az container create --resource-group MyResourceGroup --name mycontainer --image vantageco.azurecr.io/myapp:latest --cpu 1 --memory 1.5 --ports 80 --location eastus

  3. C

    az container create --resource-group MyResourceGroup --name mycontainer --image vantageco.azurecr.io/myapp:latest --cpu 2 --memory 3.5 --ports 80 --dns-name-label myapp-staging --location eastus

  4. D

    az container create --resource-group MyResourceGroup --name mycontainer --image vantageco.azurecr.io/myapp:latest --cpu 2 --memory 3.5 --registry-login-server vantageco.azurecr.io --registry-username --registry-password

Show answer and explanation

Correct answer: A

Explanation

To provision a container from a private ACR in Azure Container Instances, you must provide the correct CPU and memory settings, and you must include the registry credentials if the image is stored in a private repository. Additionally, specifying a DNS name label and port mapping is necessary to make the container publicly accessible. Only the first option satisfies all these requirements.

  • A. Correct.

    Includes correct CPU, memory, ports, DNS label, location, and private registry credentials needed for deploying the container from the private ACR.

  • B. Incorrect.

    Specifies incorrect CPU and memory resources, and does not include DNS label or credentials to access the private ACR.

  • C. Incorrect.

    Specifies correct CPU, memory, and DNS label, but does not include credentials to access the private ACR.

  • D. Incorrect.

    Specifies correct CPU, memory, and the private registry credentials, but does not set a DNS label or expose port 80 properly.

Timed practice exam

Take a AZ-104 practice test under exam conditions

60 questions in 60 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam