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?

  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.Correct answer
  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.

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

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