Skip to content

Instantly share code, notes, and snippets.

@miked0004
Created May 19, 2018 11:58
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 miked0004/9b9f2a6e75da256b2f910dfce0b4aa05 to your computer and use it in GitHub Desktop.
Save miked0004/9b9f2a6e75da256b2f910dfce0b4aa05 to your computer and use it in GitHub Desktop.
Easy save and restore docker images

Docker Save and Restore Images

Use this to save and load images from local disk. It is faster and more efficient than network loading. Caveat, the images can become outdated.

Pull Image

docker pull gradle:4.7.0-jdk8

Save Image

docker save gradle:4.7.0-jdk8 | gzip -c > gradle_470jdk8.dockerimage.tgz

Restore/Load Image

zcat gradle_470jdk8.dockerimage.tgz | docker load 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment