Skip to content

Instantly share code, notes, and snippets.

@phx
Last active December 26, 2017 17:16
Show Gist options
  • Save phx/e8f1b81e9f6322fcb45438bde23ffb39 to your computer and use it in GitHub Desktop.
Save phx/e8f1b81e9f6322fcb45438bde23ffb39 to your computer and use it in GitHub Desktop.
Flatten Docker image and re-import as smaller image
docker export image1_container | docker import -
docker rmi image1:latest
docker tag [IMPORTED IMAGE NAME] image1:latest
docker rmi [IMPORTED IMAGE NAME]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment