Azure Container Registry and Container Instances · AZ-204: Developing Solutions for Microsoft Azure Develop Azure Compute Solutions
An Azure Container Instance must pull a private image from Azure Container Registry. The security team prohibits storing registry administrator passw…
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.
medium · MCQ · Q-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?
- 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.Correct answer
- 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.
Solution
A managed identity avoids embedding long-lived credentials. The identity must have the AcrPull role and must be associated with the container group for ACI to authenticate to the private registry.
More from Azure Container Registry and Container Instances
- A development team has a Dockerfile and wants Azure Container Registry to build the image without requiring Docker to be installed on the d…
- 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