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

  1. Question 1Q-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 .
    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
    See the answer and solution
  2. Question 2Q-0047C2

    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?

    1. A.Enable anonymous pull access on the container registry.
    2. 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.
    3. C.Use the registry administrator account and pass its password as an ACI environment variable.
    4. D.Grant the ACI subnet the Contributor role on the resource group.
    See the answer and solution
  3. Question 3Q-4AB496

    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?

    1. A.contosoregistry.azurecr.io/orders:latest
    2. B.contosoregistry.azurecr.io/orders:production
    3. C.contosoregistry.azurecr.io/orders@sha256:<tested-manifest-digest>
    4. D.contosoregistry.azurecr.io/orders:restart-safe
    See the answer and solution
  4. Question 4Q-2F075C

    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?

    1. A.az container create --resource-group rg1 --name batch1 --image contoso/batch:1.0 --restart-policy Always
    2. B.az container create --resource-group rg1 --name batch1 --image contoso/batch:1.0 --restart-policy OnFailure
    3. C.az container create --resource-group rg1 --name batch1 --image contoso/batch:1.0 --restart-policy Never
    4. D.az container create --resource-group rg1 --name batch1 --image contoso/batch:1.0 --restart-policy Manual
    See the answer and solution
  5. Question 5Q-66792E

    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?

    1. A.Use an Azure Container Registry Premium registry and configure geo-replicas in West Europe and East US.
    2. B.Use an Azure Container Registry Basic registry and configure multiple repositories with the same name.
    3. C.Create one Azure Container Registry Standard registry in each region and configure Azure Container Instances to merge the registries automatically.
    4. D.Store the image in Azure Blob Storage and configure Azure Container Instances to treat the blob container as an ACR replica.
    See the answer and solution

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 free

Free to start · No credit card needed