Docker gotchas ( 3 . docker Save Vs Export . Whats the difference between them ?)

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 is #docker save and #docker export command and #docker load and #docker import) they are the counterparts of these commands. Now, you are confused on which one to use. 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.

When docker export is used, some type of merging happening under the hood and the outcome is a single flat layer. You loose the history and metadata of the build process of hte container. However in docker save, the history is maintained . Which one to use ? Upto 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.

Digiprove sealCopyright secured by Digiprove © 2017 Humble Chirammal

Leave a Reply

Your email address will not be published. Required fields are marked *