Using docker, you can create images based on other images very nicely. For instance, you can make an image Java-jdk7 (based on the latest Ubuntu LTS), and based on that create images elastic-search and tomcat7 (both of which need java).
So, if I don't tag my images, I end up with the following (extract of docker images):
╔══════════════════════╦════════╦══════════════╗
║ REPOSITORY ║ TAG ║ ID ║
╠══════════════════════╬════════╬══════════════╣
║ ubuntu ║ 12.04 ║ 8dbd9e392a96 ║
║ quintenk/jdk7-oracle ║ latest ║ 8928245086f4 ║
║ quintenk/tomcat7 ║ latest ║ 995cdb2cbfa8 ║
║ quintenk/elastics ║ latest ║ 123abc456ef2 ║
╚══════════════════════╩════════╩══════════════╝
Now for the question. How do/should I maintain this dependency? How do I perform maintainance one 1 image and the dependent images as well?
- If I update my jdk image (
apt-get upgradefor instance), I assume I do not corrupt the dependent images? However, I also assume that the dependency tree is not as you would expect any longer. [UPDATE: I've reproduced this, so see my own answer below] - If 1 is correct, is there some way that I can have the dependent images flag themselves as outdated, and (hopefully) have them rebuild themselves?
Or is the way to go to tag the containers with a version number, and manually rebuild and redistribute all dependencies with increased version number tags? That would mean the Dockerfiles would need to be altered for an update.
UPDATE: I found the following image on the docker site in their presentation. However, I'm not quite sure on the steps of how to do this (especially with dependencies on other images as I described).

