Search code examples
docker-composeazure-resource-managerazure-container-registry

Unable to push an image to to Azure Container Register. Why the created resource does not appear the Azure dashboard?


I am tryng to push am image in the Azure Container Register. I create the resource and I manage to succeed with the login (docker login etherbatch.azurecr.io) but when I actually push the image : (docker push docker_etherbatch:latest) I receive the following message : denied: requested access to the resource is denied.

The interesting thing is that the resource disappeared from my dashboard and when I tried to create another one with the same name it says that it already exists.

I created the resource in another zone different from mine.

Any clue?

Thanks in advance


Solution

  • The detail is not enough to give a certain reason for the error. Here I would give some possible reasons and you can find the related one according to your situation.

    One is that the image you want to push to ACR is incorrect. It should be etherbatch.azurecr.io/docker_etherbatch:latest and then you can push it to the ACR.

    Another one is that the account you use to log in to the ACR does not have enough permission. If you use the admin user of the ACR, there must be no problem. The admin user has all the permissions. If you use the service principal and just want to push images, you need to assign the service principal a role of AcrPush. Here shows the details of the authentication of the ACR.