Skip to content

Instantly share code, notes, and snippets.

@wildlyinaccurate
Last active October 7, 2015 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wildlyinaccurate/22ac6f926edec382de29 to your computer and use it in GitHub Desktop.
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
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