I have a problem related to docker image size. We create distributable docker images using the ‘docker save …’ command. However, in my case we have a requirement of multiple docker images being based off a base image (say centos:7). Third party people would implement multiple docker images based off my base docker image and would be able to deploy that image independently.
However, each docker image ends up saving my base image that is based of centos:7 image. This is leading to each docker image that is being saved using ‘docker save…’ being fat.
Is there a way to package (save) only my files that would exclude the base layers ? How does one exclude the base layers from docker image ?