I am playing around with Docker for a couple of days and I already made some images (which was really fun!). Now I want to persist my work and came to the save
and
export
: container (filesystem)
->image tar
.
import
: exported image tar
-> image
. Only one layer.
save
: image
-> image tar
.
load
: saved image tar
->image
. All layers will be recovered.
From Docker in Action, Second Edition p190.
Layered images maintain the history of the image, container-creation metadata, and old files that might have been deleted or overridden.
Flattened images contain only the current set of files on the filesystem.