Chapter 3 · AZ-204: Developing Solutions for Microsoft Azure Develop Azure Compute Solutions
Azure Container Registry and Container Instances
20 practice questions · 5 marks weightage
Practice questions
- Question 1Q-2B97B6See the answer and solution
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 .
- 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
- Question 2Q-0047C2See the answer and solution
An Azure Container Instance must pull a private image from Azure Container Registry. The security team prohibits storing registry administrator passwords or service principal secrets in deployment scripts. Which approach satisfies the requirement?
- A.Enable anonymous pull access on the container registry.
- B.Create a managed identity, grant it the AcrPull role on the registry, and configure the container group to use that identity when pulling the image.
- C.Use the registry administrator account and pass its password as an ACI environment variable.
- D.Grant the ACI subnet the Contributor role on the resource group.
- Question 3Q-4AB496See the answer and solution
A production team deploys an image from Azure Container Registry to Azure Container Instances. The team must ensure that a restart or a later deployment always uses the exact image that was tested, even if another build later reuses the same tag. Which image reference should the deployment use?
- A.contosoregistry.azurecr.io/orders:latest
- B.contosoregistry.azurecr.io/orders:production
- C.contosoregistry.azurecr.io/orders@sha256:<tested-manifest-digest>
- D.contosoregistry.azurecr.io/orders:restart-safe
- Question 4Q-2F075CSee the answer and solution
A batch workload runs in Azure Container Instances and should stop after completing successfully. If it fails, Azure should restart the container automatically. Which Azure CLI option provides this behavior?
- A.az container create --resource-group rg1 --name batch1 --image contoso/batch:1.0 --restart-policy Always
- B.az container create --resource-group rg1 --name batch1 --image contoso/batch:1.0 --restart-policy OnFailure
- C.az container create --resource-group rg1 --name batch1 --image contoso/batch:1.0 --restart-policy Never
- D.az container create --resource-group rg1 --name batch1 --image contoso/batch:1.0 --restart-policy Manual
- Question 5Q-66792ESee the answer and solution
A company deploys Azure Container Instances in West Europe and East US. The containers in each region frequently pull images from Azure Container Registry, and the company wants image pulls to use a registry replica close to each deployment region. Which solution meets the requirement?
- A.Use an Azure Container Registry Premium registry and configure geo-replicas in West Europe and East US.
- B.Use an Azure Container Registry Basic registry and configure multiple repositories with the same name.
- C.Create one Azure Container Registry Standard registry in each region and configure Azure Container Instances to merge the registries automatically.
- D.Store the image in Azure Blob Storage and configure Azure Container Instances to treat the blob container as an ACR replica.
15 more questions on Azure Container Registry and Container Instances
Sign up free to practise the full chapter. Questions you get wrong come back until you've mastered them.
Start practising freeFree to start · No credit card needed