1
votes

I'm trying to run a multicontainer web app based in two images that I stored in an azure container registry (launched with a docker compose yml custom file) but it fails because the docker-compose proccess cannot get the images due to an "unauthorized: autentication required" response. Both the container registry and the web app belongs to the same resource group.

How can we solve this problem? Thanks in advance.

2

2 Answers

0
votes

@jennylwrnce from Azure Developer App Service Team tweeted this:

https://blogs.msdn.microsoft.com/appserviceteam/2018/06/27/use-acr-for-multicontainer-web-app/

So it can be solved via panel.azure.com

enter image description here

0
votes

You need to configure authentication for the webapp, by default it can only pull public images.

this is the sample command to do that:

az webapp config container set --name <app_name> 
       --resource-group myResourceGroup 
       --docker-custom-image-name <azure-container-registry-name>.azurecr.io/mydockerimage 
       --docker-registry-server-url https://<azure-container-registry-name>.azurecr.io 
       --docker-registry-server-user <registry-username> 
       --docker-registry-server-password <password>

https://docs.microsoft.com/en-us/azure/app-service/containers/tutorial-custom-docker-image#use-a-docker-image-from-any-private-registry-optional

this article also talks about how to push to the private repo (ACR) and how to configure it