After another Docker pull losing connection partway through a download (95% of 12GB this time), I spun up a virtual machine in the cloud and did the pull there, followed by docker save
and downloading locally - this allows for a resumable download over SSH.
Overview:
- Set up cloud machine with either password or SSH key access (key access example below).
- Install docker
docker pull
the imagedocker save
the image as compressed image using gzip- Download with
rsync
After installing Docker, here's an example using hello-world on the virtual machine:
docker pull hello-world
docker save hello-world | gzip > hello-world.tar.gz
Then, from your home machine:
rsync -P -z -e "ssh -i [SSHKEY]" USER@SERVER:~/hello-world.tar.gz ~/Downloads/hello-world.tar.gz
docker load < ~/Downloads/hello-world.tar.gz
rsync may be cancelled with ctrl-c, and if cancelled or otherwise failing can be resumed with the same command.