Skip to content

Instantly share code, notes, and snippets.

@dermatologist
Forked from monkeym4ster/docker.sh
Created November 18, 2019 22:36
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 dermatologist/dc7be6bfc6e9c2866b38cfd5465c51ee to your computer and use it in GitHub Desktop.
Save dermatologist/dc7be6bfc6e9c2866b38cfd5465c51ee to your computer and use it in GitHub Desktop.
Docker: save/load container using tgz file (tar.gz)
#for not running docker, use save:
docker save <dockernameortag> | gzip > mycontainer.tgz
#for running or paused docker, use export:
docker export <dockernameortag> | gzip > mycontainer.tgz
#load
gunzip -c mycontainer.tgz | docker load
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment