I'm playing around with LXC. My goal is to run a single process within a container and I'm now focusing on processes running within my container.
When I create a basic LXC template on ubuntu 12.04, I've got about ten processes running (including cron, ttys, init ...). When I do the same with docker or Heroku dynos (using
ps -ef), I've got only the process I launched. This lead to 2 questions:
Docker doesn't use the
rootfsof the containers (I suppose) are custom images downloaded. How do they tweak this image to make it run only one process ?
Dynos on Heroku have only one process running (the one users intend to run) but support the automatic restart of the process if this one crashes. I know this is possible if the process is supervised by
upstart, but that means that at least
initshould run within the dyno (and that's no the case). How do they achieve this ?
These questions are quite complex, I'm not looking for a detailed answer here but just general ideas on how this work.