Thanks for the prompt response! Let me explain why I was thinking about custom data-vol containers.
So, I have an official Jekyll image (a static site generator), that I would like to use as a baseline for other images will be built on top of that, each derived image will have its own site files inside. It works great and that is the way I currently do it.
However, it is a huge waste of disk space! Each derived image is ~300MB, while all the site files and Ruby gems that come along with it take only ~20MB (the worst case)!
In my experiments (local of course), I built a lightweight data-packed image (
FROM scratch) that has only site files and nothing else, then I created a container from that image and started a new Jekyll container from the original image using the volumes from the data-packed container.
And that is (optimization of disk space usage) only one of the benefits using that model. The other benefits are that I can easily do Jekyll upgrades, rollbacks and other cool stuff while at the same time improving build time and portability.
Hope that makes sense.