From 02c900f4c56e9cd9b5975e89cf5b288dc0c91edb Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Tue, 5 May 2015 15:32:36 -0700 Subject: [PATCH] Add --uts=host to allow sharing the UTS namespace Signed-off-by: Darren Shepherd --- docs/sources/reference/commandline/cli.md | 3 +++ docs/sources/reference/run.md | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/docs/sources/reference/commandline/cli.md b/docs/sources/reference/commandline/cli.md index 3b7d88e35c..940f0f0abd 100644 --- a/docs/sources/reference/commandline/cli.md +++ b/docs/sources/reference/commandline/cli.md @@ -991,6 +991,8 @@ Creates a new container. --oom-kill-disable=false Whether to disable OOM Killer for the container or not -P, --publish-all=false Publish all exposed ports to random ports -p, --publish=[] Publish a container's port(s) to the host + --pid="" PID namespace to use + --uts="" UTS namespace to use --privileged=false Give extended privileges to this container --read-only=false Mount the container's root filesystem as read only --restart="no" Restart policy (no, on-failure[:max-retry], always) @@ -1958,6 +1960,7 @@ To remove an image using its digest: -P, --publish-all=false Publish all exposed ports to random ports -p, --publish=[] Publish a container's port(s) to the host --pid="" PID namespace to use + --uts="" UTS namespace to use --privileged=false Give extended privileges to this container --read-only=false Mount the container's root filesystem as read only --restart="no" Restart policy (no, on-failure[:max-retry], always) diff --git a/docs/sources/reference/run.md b/docs/sources/reference/run.md index fdc905fe44..7c5113f6de 100644 --- a/docs/sources/reference/run.md +++ b/docs/sources/reference/run.md @@ -157,6 +157,7 @@ called a digest. As long as the input used to generate the image is unchanged, the digest value is predictable and referenceable. ## PID settings (--pid) + --pid="" : Set the PID (Process) Namespace mode for the container, 'host': use the host's PID namespace inside the container @@ -177,6 +178,23 @@ within the container. This command would allow you to use `strace` inside the container on pid 1234 on the host. +## UTS settings (--uts) + + --uts="" : Set the UTS namespace mode for the container, + 'host': use the host's UTS namespace inside the container + +The UTS namespace is for setting the hostname and the domain that is visible +to running processes in that namespace. By default, all containers, including +those with `--net=host`, have their own UTS namespace. The `host` setting will +result in the container using the same UTS namespace as the host. + +You may wish to share the UTS namespace with the host if you would like the +hostname of the container to change as the hostname of the host changes. A +more advanced use case would be changing the host's hostname from a container. + +> **Note**: `--uts="host"` gives the container full access to change the +> hostname of the host and is therefore considered insecure. + ## IPC settings (--ipc) --ipc="" : Set the IPC mode for the container,