I'm working in an office where my laptop is internet-connected, but tightly controlled. I am not allowed to install unauthorized software onto it.
My development workstation is mine to do with as I please, but it does not have an internet connection.
Is there any way for me to download Docker images from the hub as a file that I could then sneaker-net to my dev workstation? Similar to how I can download RPMs or Ruby Gems and burn them to CD? Or is the only way of downloading the images using the 'docker pull' command?
Short: use the
save
CLI command.https://docs.docker.com/engine/reference/commandline/save/
You can pull the image on a computer that have access to the internet.
Then you can save this image to a file
Transfer the file on the offline computer (USB/CD/whatever) and load the image from the file:
(On older versions this was just
docker load image.docker
, see comments for more info.)I realize there is already an accepted answer, however I wanted to offer this solution that I think more directly addresses the question asked: "How do I download a Docker Image without using Docker to perform the retrieval?"
I have a similar issue, where my company's policies require me to provide a team with the file(s) (typically by way of URL) that I want to use. They will then perform various scans and audits, and then place the file(s) onto our disconnected development network. I cannot use Docker to retrieve the file, then export it and hand it to that team, so the other answer provided was not an option for me.
Luckily, I found this answer over on StackOverflow, which recommends using a useful tool provided by samalba at GitHub: https://github.com/samalba/docker-registry-debug
Of course, that tool was meant to be built using Docker, and part of the reason I need it is because I don't have open access to Docker :). So, since I didn't have that option, I'll spell out the steps I took here (this is all as of commit 05fffc4344fd6f866f84c403caae3ba81193dd45 from that repo):
The output of that command is a complete curl command line that can be used to download the file:
Hope this helps someone else!