Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pulling docker images

Tags:

Is there a way where I can manually download a docker image?

I have pretty slow Internet connection and for me is better to get a link of the image and download it elsewhere with better Internet speed,

How can I get the direct URL of the image managed by docker pull?

like image 405
Carlos Castellanos Avatar asked Mar 13 '14 14:03

Carlos Castellanos


People also ask

How can I pull the docker image?

Most of your images will be created on top of a base image from the Docker Hub registry. Docker Hub contains many pre-built images that you can pull and try without needing to define and configure your own. To download a particular image, or set of images (i.e., a repository), use docker pull .


2 Answers

It's possible to obtain that, but let me suggest two other ways!

  1. If you can connect to a remote server with a fast connection, and that server can run Docker, you could docker pull on that server, then you can docker save to export an image (and all its layers and metadata) as tarball, and transfer that tarball any way you like.

  2. If you want to transfer multiple images sharing a common base, the previous method won't be great, because you will end up transferring multiple tarballs sharing a lot of data. So another possibility is to run a private registry e.g. on a "movable" computer (laptop), connect it to the fast network, pull images, push images to the private registry; then move the laptop to the "slow" network, and pull images from it.

If none of those solutions is acceptable for you, don't hesitate to give more details, we'll be happy to help!

like image 96
jpetazzo Avatar answered Sep 20 '22 17:09

jpetazzo


You could pull down the individual layers with this: https://github.com/samalba/docker-registry-debug

Use the curlme option.

Reassembling the layers into an image is left as an exercise for the reader.

like image 26
Andy Avatar answered Sep 21 '22 17:09

Andy