彼得名姓
彼得名姓

Reputation: 207

Wondering about differences between Docker vs Supervisor

They seem to accomplish the same thing of managing processes. What's the difference between Docker and Supervisor?

Upvotes: 1

Views: 3218

Answers (1)

VonC
VonC

Reputation: 1324043

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

Upvotes: 7

Related Questions