0

I want to use local docker client with the Azure Container Registry. I got the access keys for ACR. I use them as below:

docker login <acrname>.azurecr.io
username: <type>
password:<copy/paste>

docker successfully logs me in.

docker image list 

The above lists local images. So, how do I get docker client to select the ACR as registry by default?

If I can't do that, why doesn't the below work?

docker --host exampleacr.azurecr.io image list

Getting an error:

error during connect: Get http://exampleacr.azurecr.io:2375/v1.40/images/json: dial tcp 40.71.10.222:2375: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

micahmckittrick
  • 1,476
  • 8
  • 11
Vyas Bharghava
  • 6,372
  • 9
  • 39
  • 59

1 Answers1

1

My understanding so far: The --host parameter is for the remote docker daemon. ACR is JUST a registry. Do not expect a docker daemon.

If you know the image use

docker pull exampleacr.azurecr.io/image

AND use local machine with the docker daemon to create containers and generally work with the image. I can list the repositories and tags using

az acr repository list --name exampleacr

Lists "cloudlene/example" as a repository

az acr repository show-tags -n exampleacr --repository cloudlene/example

Lists "2057,2058,2059 as tags and then PULL with docker client:

docker pull exampleacr.azurecr.io/cloudlene/example:2059
Vyas Bharghava
  • 6,372
  • 9
  • 39
  • 59