Download a Docker image to file to use on disconnected container host
Find out how to download a Docker image to file and then use on an Internet disconnected container host.
June 10, 2017
Q. How can I download an image from Docker to a container host without Internet connectivity?
A. Normally images can be pulled directly from repositories such as Docker Hub however if a machine does not have Internet connectivity and the repository is not on-premises than it will not be possible to download images. An alternate approach is to download the images from a machine that has internet connectivity, save the image to a file, copy to the container host then import.
To save a downloaded image (assuming pulled already using docker pull) to file use:
docker save -o .docker :
Then once copied to the target container host (could use Copy-Item to a session via -ToSession) to import use
docker load -i .docker
Then check it is shown (docker images).
[Container World delivers real-world case studies from the cloud-native ecosystem, hands-on technical education, the best speakers and cutting-edge startups under one roof. Get your ticket.]
About the Author
You May Also Like