Using ACR across subscriptions with Web App for Containers fails

Thomas Pentenrieder 36 Reputation points MVP
2020-02-25T13:59:22.49+00:00

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 App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,859 questions
{count} votes

5 answers

Sort by: Most helpful
  1. Alexander Kyte 1 Reputation point
    2020-06-10T18:37:47.233+00:00

    @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.

    0 comments No comments

  2. Jenny Lawrance 1 Reputation point Microsoft Employee
    2020-07-20T18:53:11.867+00:00

    @Thomas Pentenrieder , 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.

    0 comments No comments

  3. Dr. Stefan Werden | MCM 1 Reputation point
    2021-03-27T21:19:18.147+00:00

    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://learn.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

    0 comments No comments

  4. Warwick Bayne 1 Reputation point
    2021-04-16T01:47:01.763+00:00

    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 @Dr. Stefan Werden | MCM

    0 comments No comments

  5. Dr. Stefan Werden | MCM 1 Reputation point
    2021-04-16T05:22:21.32+00:00

    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

    0 comments No comments