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?
- A.az acr build --registry contosoreg --image orders:1.0 .Correct answer
- B.az container create --registry contosoreg --image orders:1.0 .
- C.az acr import --name contosoreg --source .
- 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
- An Azure Container Instance must pull a private image from Azure Container Registry. The security team prohibits storing registry administr…
- A production team deploys an image from Azure Container Registry to Azure Container Instances. The team must ensure that a restart or a lat…
- A batch workload runs in Azure Container Instances and should stop after completing successfully. If it fails, Azure should restart the con…
- A company deploys Azure Container Instances in West Europe and East US. The containers in each region frequently pull images from Azure Con…
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 freeFree to start · No credit card needed