I have 4 windows images, all are built using same 5 GB Base image. Now I want to save them using “docker save” command into the same tar file.
Is it possible somehow to minimize the size of the final archive by reusing the layer(s) that come from the base image ? Or is there any other method to obtain a smaller final archive size given that all four images were created from same base image ?
On linux, if you use the docker save
command with multiple image names, the resulting tar file contains only one instance of each unique layer. So space is saved wherever there are common layers.
I haven’t tried it on Windows, but logically it should do the same thing.