You are configuring an on-premises CI/CD runner to build and push container images to an Azure Container Registry named corpacr. The runner does not have the Azure CLI installed, and you must minimize additional tool installations. You have created a Microsoft Entra service principal named sp-cicd to authenticate the runner. Which two actions should you perform to configure permissions and authenticate the runner? (Choose two.)
- Assign the AcrPush role to the sp-cicd service principal for the corpacr registry resource.Cevap
- Execute the docker login command on the runner using the application ID of sp-cicd as the username and its client secret as the password.Cevap
- CAssign the Reader role to the sp-cicd service principal for the corpacr registry resource.
- DExecute the az acr login --name corpacr command on the runner using the sp-cicd credentials.
Cevap
To configure permissions and authenticate the on-premises runner without installing the Azure CLI, you must assign the AcrPush role to the service principal to allow image uploads, and execute a standard docker login command using the service principal's application ID and client secret.
To push images to Azure Container Registry, the identity must have the AcrPush role assigned. For environments without the Azure CLI installed, authentication is achieved by calling docker login with the registry login server, specifying the service principal application ID as the username and the client secret as the password.
Adım Adım Çözüm
Anahtar Kavram
Azure Container Registry authentication and permission management using Service Principals.
Tahmini Süre:1m 30s