Skip to content

Instantly share code, notes, and snippets.

@kgrvamsi
Forked from tosone/docker.sh
Created March 23, 2020 18:49
Show Gist options
  • Select an option

  • Save kgrvamsi/22e0085963675d99f71f37aa5dea0a8a to your computer and use it in GitHub Desktop.

Select an option

Save kgrvamsi/22e0085963675d99f71f37aa5dea0a8a to your computer and use it in GitHub Desktop.

Revisions

  1. @tosone tosone created this gist Oct 11, 2019.
    8 changes: 8 additions & 0 deletions docker.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    #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