Re:“I just want to run a container”
by dkarapetyan on Monday October 03, 2016 @01:40AM
(#12625655)
This is exactly how the overlay filesystem in docker works. You make a base container with common runtime dependencies and then you layer applications that require those same dependencies on top. The applications can be quite dissimilar. I don't see why the point of containerization has been lost? Just because the same kind of thing is hard to do without an overlay filesystem doesn't mean there is anything wrong with the approach.
Things get complicated when one the applications decide to write to the shared data. Do you reflect the changes to the other container? How isolated do you wish to keep them? I mean at one point one should consider if they want to share these underlying resources, perhaps they should just be okay with running them as two processes.
Re:“I just want to run a container”
by jacques_chester on Monday October 03, 2016 @06:55PM
(#12632039)
Typically the design pattern is that long-lived state is outside the container. So you'd have a volume that you attach.
Re:“I just want to run a container”
by dkarapetyan on Monday October 03, 2016 @01:44PM
(#12629601)
I don't think it's complicated. If you need a shared location so that different containers can write to then you should explicitly mark those locations and mount them inside the respective containers. This wouldn't be any different if you were sharing directories between processes.
Under this architecture, what happens when I want to update my applications to use a new version of a shared library? I either am forced to update all of my applications at once or I must modify the architecture and remove that shared dependency. This breaks down the composition that containerization promises.
I think that this advice should be re-examined. I am by no means an expert, but this doesn't seem smart to me...