Well, Everyone want to save the image or container after some amount of work on the container. When looking for the options they see there are mainly 2 options.
#docker save
#docker export
Along with the above commands, the follow-up commands are also available which are:
#docker load
#docker import
Now, you are confused about which one to use?. It’s simple: The docker save and export commands are used for saving, but what? Its simple, docker export save the container and docker save do it for the image.
In short: `save` is for the image, `export` for container.
When docker export is used, some type of merging happening under the hood and the outcome is a single flat layer. You lose the history and metadata of the build process of the container.
However in docker save, the history is maintained. Which one to use? Up to you, based on your use case. One other difference is that the export tar will be less in size compared to ‘save’d tar, obviously because the save carries the history and metadata with it.
Copyright secured by Digiprove © 2017 Humble Chirammal