Search code examples
azuredockerweb-applications

Connecting an Azure Web app (container) to an Azure container registry using the CLI


I'm trying to Connect a Azure Webb app (containers) to an Azure Container Registry Using the Azure CLI. I have an Azure Container Registry located in the same Ressouce Group as the Webb App. My command looks like this: az webapp config container set --name "containerbugdemo" --resource-group "Containerbug" --docker-custom-image-name "application/helloworld:latest" --docker-registry-server-url "https://"$arcName.azurecr.io" --docker-registry-server-password "****" --docker-registry-server-user "***" After running the command the container settings blade shows the following error:

Failed to get a list of tags.

And the Container fails to get pulled by the WebApp. If I try the same procedure only using the graphical interface through the Azure portal, everything works as expected.


Solution

  • It seems you set the wrong image name. If you use the image in the ACR, you need to set the image name as acrname.azurecr.io/repository:tag, both when you create the web app and container setting, not just repository:tag. And the server URL is also a mistake that one more double quote in the question.