Last active
October 7, 2015 13:44
-
-
Save wildlyinaccurate/22ac6f926edec382de29 to your computer and use it in GitHub Desktop.
Using Docker's save/load commands to share and run images without using a registry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REGISTRY=registry.yourdomain.com | |
# You may want/need to pull the latest images on a machine which has access to the registry | |
docker pull $REGISTRY/foo | |
docker pull $REGISTRY/bar | |
# You can save the images as tarballs and distribute them as you please | |
docker save --output=/home/user/images/foo.tar $REGISTRY/foo | |
docker save --output=/home/user/images/bar.tar $REGISTRY/bar | |
# And now you can load and these images from the local tarballs without needing to touch the registry | |
docker load --input=/home/user/images/foo.tar | |
docker load --input=/home/user/images/bar.tar | |
docker run $REGISTRY/foo echo Hello, world! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment