Skip to content

Instantly share code, notes, and snippets.

@atheiman
Created May 21, 2024 01:55
Show Gist options
  • Save atheiman/0cbe186d280afe03e77bcd31fa1335e1 to your computer and use it in GitHub Desktop.
Save atheiman/0cbe186d280afe03e77bcd31fa1335e1 to your computer and use it in GitHub Desktop.
Package and share docker image
# Package docker image to .tar.gz to share to another machine
docker pull alpine
docker save alpine | gzip > alpine.tar.gz
# Load docker image from .tar.gz
docker load < alpine.tar.gz
# Show loaded image
docker image ls alpine
# REPOSITORY TAG IMAGE ID CREATED SIZE
# alpine latest 05455a08881e 3 months ago 7.38MB
# Run the specific loaded image from image id
docker run --rm -it 05455a08881e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment