Check out this discussion for a good read on this issue. In principle, the official party line from Solomon Hykes and dockers is that docker containers should be as close as possible to microservices with single processes. There can be many such servers on one "real" server. If processes crash, you should just start a new docker container and not try to set up initialization, etc. Inside the containers. Therefore, if you are looking for canonical recommendations, the answer to this question does not contain the basic linux services. It also makes sense when you think that many docker containers work on the same node, do you really want all of them to run their own versions of these services?
They say that the state of registration in the docker service is famously broken . Even Solomon Hicks, the creator of the docker, acknowledges his work in the process. In addition, you usually require a little more flexibility for a real world deployment. Usually I mount my logs on the host system using volumes and run the log daemon, etc., running on the vm host. In the same way, I either install sshd or leave the interactive shell open in the container, so I can issue secondary commands without restarting, at least until Iβm sure that my containers are airborne and no debugging is required.
Edit: With docker 1.3 and the exec command, you no longer need to "leave the interactive shell open."
Usman ismail
source share