Browse code

Merge pull request #30523 from nathanleclaire/document_init

Document --init flag for docker run
(cherry picked from commit e0cc664cc34959b301849378f3e98146b079fc5e)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Misty Stanley-Jones authored on 2017/02/08 02:28:30
Showing 1 changed files
... ...
@@ -667,7 +667,18 @@ It also causes any seccomp filters to be applied later, after privileges have be
667 667
 which may mean you can have a more restrictive set of filters.
668 668
 For more details, see the [kernel documentation](https://www.kernel.org/doc/Documentation/prctl/no_new_privs.txt).
669 669
 
670
-## Specifying custom cgroups
670
+## Specify an init process
671
+
672
+You can use the `--init` flag to indicate that an init process should be used as
673
+the PID 1 in the container. Specifying an init process ensures the usual
674
+responsibilities of an init system, such as reaping zombie processes, are
675
+performed inside the created container.
676
+
677
+The default init process used is the first `docker-init` executable found in the
678
+system path of the Docker daemon process. This `docker-init` binary, included in
679
+the default installation, is backed by [tini](https://github.com/krallin/tini).
680
+
681
+## Specify custom cgroups
671 682
 
672 683
 Using the `--cgroup-parent` flag, you can pass a specific cgroup to run a
673 684
 container in. This allows you to create and manage cgroups on their own. You can