question

thp avatar image
3 Votes"
thp asked DrStefanWerdenMCM-4532 answered

Using ACR across subscriptions with Web App for Containers fails

I'm unable to get a docker image from ACR in app service that lives in a different subscription.

To Reproduce

  1. Create ACR in one subscription, add container

  2. Add Web App for Containers in another subscription

  3. Since the ACR won't show up in the Web App dropdown menu, enter connection details in private registry tab and save

  4. Exit and re-enter container settings

  5. The settings were moved to the Azure Container Registry tab and are not working => no image is being deployed

Expected behavior

The settings should stay in the private registry tab and a container should be pulled from ACR.

Setting the DOCKER_REGISTRY_SERVER_URL, DOCKER_REGISTRY_SERVER_USERNAME & DOCKER_REGISTRY_SERVER_PASSWORD values in the app config directly does not work.

Any relevant environment information

  • Azure Portal

Additional context

Issue is also being discussed here https://github.com/Azure/acr/issues/345 and here https://github.com/microsoft/vscode-docker/issues/743

azure-webapps
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @thp,

When you created your ACR, did you enable 'Admin' access on the registry and supplied the credentials ?

3583-2020-02-28-17-00-21-testingdevspaceacr-access-keys.png

What log output are you getting when your webapp container blade?


0 Votes 0 ·
AlexanderKyte-1184 avatar image
0 Votes"
AlexanderKyte-1184 answered

@ryanchill


2020-06-10T18:27:04.660Z ERROR - DockerApiException: Docker API responded with status code=InternalServerError, response={"message":"Get https://xxxxxxx.azurecr.io/v2/xxxxxxx: unauthorized: authentication required"}


is seen.


And yeah the URL, username, and password supplied should all be working.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JennyLawrance-0353 avatar image
0 Votes"
JennyLawrance-0353 answered JennyLawrance-0353 published

@thp, can you share a screen shot showing what you configured manually in the Private Registry pane? (Send email to jennylaw(at)microsoft.com, with any additional details.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DrStefanWerdenMCM-4532 avatar image
0 Votes"
DrStefanWerdenMCM-4532 answered DrStefanWerdenMCM-4532 edited

Ist there any solution for that? I got the same and I just dont find a solution

2021-03-27T20:59:05.912Z INFO - Pulling image from Docker hub: xxxxxx.azurecr.io/node-docker-demo:latest
2021-03-27T20:59:06.197Z ERROR - DockerApiException: Docker API responded with status code=InternalServerError, response={"message":"Get https://stefTestReg.azurecr.io/v2/node-docker-demo/manifests/latest: unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information."}

So docker pull to the local machine works. So the xxxxxx.azurecr.io/node-docker-demo:latest repo is ok.

Has this something to do wiht the az command
az role assignment create --assignee ....

??
So I try to make the https://docs.microsoft.com/en-us/azure/app-service/tutorial-custom-container?pivots=container-linux
happening. So ok fixed the outdated image and replaced it b node-docker-demo. But then I got this error can not get further

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

WarwickBayne-0602 avatar image
0 Votes"
WarwickBayne-0602 answered

If anyone comes accross this, the fix is mentioned here:

https://github.com/Azure/acr/issues/345

in short, you must use the container registry url when defining the image name

88388-image.png



ping @DrStefanWerdenMCM-4532


image.png (41.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DrStefanWerdenMCM-4532 avatar image
0 Votes"
DrStefanWerdenMCM-4532 answered

Thank you for your answer. Yes, in the mean time I made it work. As far as I remember this was one of the things:

  • The solution you mentioned

  • A typo in the registry name

  • Or forgot to do a "az arr login registry" on the azure cli

Thank you very much for taking answering,

Stefan

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.