Skip to content

Instantly share code, notes, and snippets.

@ragul28
Created January 11, 2020 09:02
Show Gist options
  • Save ragul28/2266996600d253cc05de97d24e5e308b to your computer and use it in GitHub Desktop.
Save ragul28/2266996600d253cc05de97d24e5e308b to your computer and use it in GitHub Desktop.
Docker Container & image export/import

Export running or paused Container:

  • Export
docker export <dockernameortag> | gzip > mycontainer.tgz
  • Load
gunzip -c mycontainer.tgz | docker load

Docker Image save & load

  • Save docker image as tar
docker save -o image.tar <Docker_Image_name>
or
docker save <Docker_Image_name> | gzip > image.tar.gz
  • Load tar docker image
docker load -i image.tar
or
docker load < image.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment