From 8329ae9e36282802788e724abd7d944aa309468c Mon Sep 17 00:00:00 2001 From: Nathan LeClaire Date: Fri, 27 Jan 2017 15:27:33 -0800 Subject: [PATCH 1/2] Document --init flag for docker run Signed-off-by: Nathan LeClaire --- docs/reference/run.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/reference/run.md b/docs/reference/run.md index 8e7153a5f1..3ad5463a7b 100644 --- a/docs/reference/run.md +++ b/docs/reference/run.md @@ -667,6 +667,17 @@ It also causes any seccomp filters to be applied later, after privileges have be which may mean you can have a more restrictive set of filters. For more details, see the [kernel documentation](https://www.kernel.org/doc/Documentation/prctl/no_new_privs.txt). +## Specifying an init process + +You can use the `--init` or `--init-path` flags to specify a process which +should be used as the PID 1 in the container, and which binary to use for this +init process, respectively. Specifying an init process ensures the usual +responsibilties of an init system, such as reaping zombie processes, are +performed inside the created container. + +The default init process used when specifying `--init` without `--init-path` is +[tini](https://github.com/krallin/tini). + ## Specifying custom cgroups Using the `--cgroup-parent` flag, you can pass a specific cgroup to run a From 241173b3b950fa17667f76bbd720fac9e04653b6 Mon Sep 17 00:00:00 2001 From: Nathan LeClaire Date: Tue, 31 Jan 2017 09:50:55 -0800 Subject: [PATCH 2/2] Remove --init-path mention Signed-off-by: Nathan LeClaire --- docs/reference/run.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/reference/run.md b/docs/reference/run.md index 3ad5463a7b..d26c625004 100644 --- a/docs/reference/run.md +++ b/docs/reference/run.md @@ -667,18 +667,18 @@ It also causes any seccomp filters to be applied later, after privileges have be which may mean you can have a more restrictive set of filters. For more details, see the [kernel documentation](https://www.kernel.org/doc/Documentation/prctl/no_new_privs.txt). -## Specifying an init process +## Specify an init process -You can use the `--init` or `--init-path` flags to specify a process which -should be used as the PID 1 in the container, and which binary to use for this -init process, respectively. Specifying an init process ensures the usual -responsibilties of an init system, such as reaping zombie processes, are +You can use the `--init` flag to indicate that an init process should be used as +the PID 1 in the container. Specifying an init process ensures the usual +responsibilities of an init system, such as reaping zombie processes, are performed inside the created container. -The default init process used when specifying `--init` without `--init-path` is -[tini](https://github.com/krallin/tini). +The default init process used is the first `docker-init` executable found in the +system path of the Docker daemon process. This `docker-init` binary, included in +the default installation, is backed by [tini](https://github.com/krallin/tini). -## Specifying custom cgroups +## Specify custom cgroups Using the `--cgroup-parent` flag, you can pass a specific cgroup to run a container in. This allows you to create and manage cgroups on their own. You can