Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 
like image 249
Dan O'Leary Avatar asked Jun 29 '16 09:06

Dan O'Leary


People also ask

How do I access private Docker images?

Navigate to Docker Hub create a Docker ID and select the personal subscription. Using docker login from the CLI, log in using your original Docker ID and pull your private images. The private images that existed in your previous namespace are now available in your new Docker ID namespace.

How do you pull the Docker image from Docker Hub in Kubernetes?

Kubernetes run docker pull pseudo/your-image:latest under the hood. image field in Kubernetes resources is simply the docker image to run. spec: containers: - name: app image: pseudo/your-image:latest [...] If your image is hosted in a private docker hub repo, you need to specify an image pull secret in the spec field.


1 Answers

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.

like image 152
Carlos Villalba Avatar answered Sep 28 '22 04:09

Carlos Villalba