Azure Container Registry and Container Instances · AZ-204: Developing Solutions for Microsoft Azure Develop Azure Compute Solutions

A development team has a Dockerfile and wants Azure Container Registry to build the image without requiring Docker to be installed on the developer's…

Practice question from Azure Container Registry and Container Instances (AZ-204: Developing Solutions for Microsoft Azure Develop Azure Compute Solutions), with the correct answer and a step-by-step solution.

easy · MCQ · Q-2B97B6

A development team has a Dockerfile and wants Azure Container Registry to build the image without requiring Docker to be installed on the developer's computer. Which Azure CLI command should they use?

  1. A.az acr build --registry contosoreg --image orders:1.0 .Correct answer
  2. B.az container create --registry contosoreg --image orders:1.0 .
  3. C.az acr import --name contosoreg --source .
  4. D.az acr login --name contosoreg --file Dockerfile

Solution

az acr build submits the build context to Azure Container Registry Tasks, which builds the image and pushes it to the specified registry. The other commands do not perform a Dockerfile build in ACR.

More from Azure Container Registry and Container Instances

All of Azure Container Registry and Container Instances

Practise more Develop Azure Compute Solutions

Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.

Start practising free

Free to start · No credit card needed