Created
April 8, 2019 09:21
-
-
Save mengjiann/52659e090caf61fcd32dcb32c7500718 to your computer and use it in GitHub Desktop.
Docker Image Export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Docker’s commit command allows users to take a running container and save its current state as an image | |
docker commit ${container-id} ${image-name} | |
# Export the image as tar | |
docker save ${image-name} > ./{image-tar-name}.tar | |
# Load a tar image | |
docker load < ${image-tar-name}.tar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment