Make 'use a process manager' clearer (#5409)

* Make 'use a process manager' clearer

The "Use a process manager" section appears to mix use of process manager on host with using process managers within a container.

The essence of the section appears to suggest that host-level process managers are ok as long as you don't combine them with docker restart policies.  But paragraphs 2 & 3 (in the original) seem to actively discourage the use of process managers within containers. Putting paragraphs 2 & 3 under an explicit heading would be clearer.

Should a section on process mangers within containers be expanded? There are lots of articles on the internet that relate to using process managers to start multiple processor in containers or to manage zombie pid 1 processes.  Are there official recommendations on what to do in these situations — whether to use a process manager or is a recommended 'docker native' way to achieve the same results?

* Updated to use the warning class
This commit is contained in:
Simon Hambly 2017-12-01 17:58:25 +00:00 committed by Jim Galasyn
parent 04a21a8de0
commit 471454b620
1 changed files with 9 additions and 7 deletions

View File

@ -63,13 +63,6 @@ Docker depend on Docker containers, you can use a process manager such as
[systemd](http://freedesktop.org/wiki/Software/systemd/), or
[supervisor](http://supervisord.org/) instead.
A process manager runs within the container and checks whether a process is
running and starts it if not. It is not Docker-aware, but just monitors
operating system processes within the container.
Docker does not recommend this approach, because it is platform-dependent
and even differs within different versions of a given Linux distribution.
> **Warning**: Do not try to combine Docker restart policies with host-level
> process managers, because the two will conflict.
@ -78,3 +71,12 @@ the same `docker start` or `docker service` command you would normally use to
start the container manually. Consult the documentation for the specific
process manager for more details.
### Using a process manager inside containers
Process managers can also run within the container to check whether a process is
running and starts/restart it if not.
> **Warning**: These are not Docker-aware and just monitor operating system processes within the container.
>
> Docker does not recommend this approach, because it is platform-dependent and even differs within different versions of a given Linux distribution.