Created
November 19, 2014 11:45
-
-
Save pvgomes/9f19e80454bb56565ee9 to your computer and use it in GitHub Desktop.
Difference between save and 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
As I described in my last post (http://tuhrig.de/difference-between-save-and-export-in-docker), there are two ways to persist a Docker images or container: | |
A Docker image can be saved to a tarball and loaded back again. This will preserve the history of the image. | |
# save the image to a tarball | |
docker save <IMAGE NAME> > /home/save.tar | |
# load it back | |
docker load < /home/save.tar | |
A Docker container can be exported to a tarball and imported back again. This will not preserve the history of the container. | |
# export the container to a tarball | |
docker export <CONTAINER ID> > /home/export.tar | |
# import it back | |
cat /home/export.tar | docker import - some-name:latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi. I want to move a container with some new files from one docker host to another docker host. Should I use save or export? Please clear this confusion for me!