How can I pull a Docker image from a private Docker Hub repo remotely?

Dan O'Leary picture Dan O'Leary · Jun 29, 2016 · Viewed 50.9k times · Source

I have several images in Docker Hub private repositories, and I need to pull these on remote machines using the Docker remote Rest API. Is there a way of authenticating remotely?

These are the calls I'd like to make remotely:

docker login
docker pull myrepo/myimage

Answer

Carlos Villalba picture Carlos Villalba · Sep 15, 2016

Yes there is a way, you only need to specify the remote host

docker login myrepo.com

Then you can access to your images

docker pull myrepo.com/myimage

and you can specify a tag as well

docker pull myrepo.com/myimage:mytag

Hope this works for you.