Microsoft Certified Azure Developer Associate · Free Practice Question Easy

Question 8

You are preparing to publish a Docker image to Azure Container Registry (ACR). Which of the following commands is used to log in to your Azure Container Registry from your local development environment before you push the image?

  • A

    az acr login --name <your-acr-name>

  • B

    docker login <your-acr-name>.azurecr.io

  • C

    az acr push <your-acr-name>

  • D

    docker push <your-acr-name>.azurecr.io/<your-image-name>:<tag>

Reveal correct answer

Correct answer: B

A. The command 'az acr login --name ' is not the correct command to log in to the Azure Container Registry (ACR) from the local development environment. This command is not valid for logging in to ACR.

B. The command 'docker login .azurecr.io' is the correct command to log in to your Azure Container Registry (ACR) from your local development environment before pushing the image. This command authenticates your Docker client to the ACR.

C. The command 'az acr push ' is used to push a Docker image to the Azure Container Registry (ACR), not to log in to the ACR from the local development environment. This command is used after logging in to the ACR.

D. The command provided is used to push a Docker image to the Azure Container Registry (ACR), not to log in to the ACR from the local development environment. This command is used after logging in to the ACR.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need