1
votes
  1. I have pushed an image to an azure repository correctly, and can see it in the portal. I can also pull with credentialed docker on my local computer after az acr login --name <registry>

  2. I have turned on "admin" in the portal, and can see a username "<username>" and password, "<password>" for the registry

  3. I have installed the az tool (Azure CLI), and have stepped through the tutorials here:

Azure Container Instances

Azure Container Instance Guide

  1. I have run the following command with every combination of user name and password I can think of, from my azure account to the registry admin pass, the second pass, no uid and pass, pre-logging in with az acr login --name <registry name>, etc.
  2. I have performed the same iterations from the Azure portal

In all cases, I receive an error: registry image is inaccessible, please check your credentials.

How do I access the registry and deploy to an instance in Azure?

Here is an anonymized command line example, wherein I use the admin login and password each time.

# image is fully qualified.
# image = server.azurecr.io/tag:version
(base) PS C:\...> az container create --resource-group group --name name \
                                      --image image --cpu 1 --memory 1 \
                                      --registry-login-server server.azurecr.io \
                                      --registry-username server \
                                      --dns-name-label label \
                                      --ports 80
Image registry password: ...

The image 'image' in container group 'group' is not accessible. 
Please check the image and registry credential.

# and a success with the same credentials

(base) PS C:\...> docker login server.azurecr.io
Username: server
Password: ...
Login Succeeded
2
Do you check if the image runs well locally? Maybe I understand it not right, the image should be server.azurecr.io/image:tag. - Charles Xu

2 Answers

1
votes

You need to fully qualify the image name with registry name like this

az container create --resource-group demors --name demoaci --image demoacr.azurecr.io/hello-world:v1 --cpu 1 --memory 1 --registry-login-server demoacr.azurecr.io --registry-username demoacr --registry-password ThePassword --dns-name-label demo3 --ports 80
0
votes

I had similar error while using uppercase characters in the registry name. Since then I'm using lowercase only in my registry names as practice. The below warning message has been shown during the 'az acr login' in my case:

Uppercase characters are detected in the registry name. When using its server url in docker commands, to avoid authentication errors, use all lowercase.