They seem to accomplish the same thing of managing processes. What's the difference between Docker and Supervisor?
Asked
Active
Viewed 2,698 times
0
-
1Supervisor runs processes. Docker runs isolated containers. – Matt Mar 21 '17 at 21:30
-
1I don't get it. – 彼得名姓 Mar 21 '17 at 21:41
1 Answers
6
You can use supervisor in a docker container actually: when you can to make sure that exiting your container will kill all your processes.
A Container isolate one main process: as long as that process runs, the container runs.
But if your container needs to run several processes, you need a supervisor to manage the propagation of signals, especially the one indicating a process needs to be terminated.
See more at "Use of Supervisor in docker" to avoid the PID 1 zombie reaping problem. (zombie processes are processes which are never stopped, and remains "zombie", without any parent process)
Since Docker 1.12 (Q3 2016), you don't need supervisor anymore if you have multiple processes:
docker run --init
See PR 26061