![]() with the service principal ID from the az webapp identity assign command.Grant the managed identity permission to access the container registry: az role assignment create -assignee -scope -role "AcrPull" The output of the command (filtered by the -query and -output arguments) is the resource ID of the Azure Container Registry. Get the resource ID of your Azure Container Registry: az acr show -resource-group -name -query id -output tsv The output of the command (filtered by the -query and -output arguments) is the service principal ID of the assigned identity, which you use shortly. Replace with the name you used in the previous step. The steps will use system-assigned managed identity, but you can use user-assigned managed identity as well.Įnable the system-assigned managed identity for the web app by using the az webapp identity assign command: az webapp identity assign -resource-group -name -query principalId -output tsv Use the following steps to configure your web app to pull from ACR using managed identity. ![]() Use managed identity to pull image from Azure Container Registry To use an image from a private registry, such as Azure Container Registry, run the following command: az webapp config container set -name -resource-group -docker-custom-image-name -docker-registry-server-url -docker-registry-server-user -docker-registry-server-password įor and, supply the login credentials for your private registry account. To change an existing custom container from the current Docker image to a new image, use the following command: az webapp config container set -name -resource-group -docker-custom-image-name /
0 Comments
Leave a Reply. |