Add --uts=host to allow sharing the UTS namespace

Signed-off-by: Darren Shepherd <darren@rancher.com>
This commit is contained in:
Darren Shepherd 2015-05-05 15:32:36 -07:00 committed by Tibor Vass
parent 2f114119bd
commit 02c900f4c5
2 changed files with 21 additions and 0 deletions

View File

@ -991,6 +991,8 @@ Creates a new container.
--oom-kill-disable=false Whether to disable OOM Killer for the container or not --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-all=false Publish all exposed ports to random ports
-p, --publish=[] Publish a container's port(s) to the host -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 --privileged=false Give extended privileges to this container
--read-only=false Mount the container's root filesystem as read only --read-only=false Mount the container's root filesystem as read only
--restart="no" Restart policy (no, on-failure[:max-retry], always) --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-all=false Publish all exposed ports to random ports
-p, --publish=[] Publish a container's port(s) to the host -p, --publish=[] Publish a container's port(s) to the host
--pid="" PID namespace to use --pid="" PID namespace to use
--uts="" UTS namespace to use
--privileged=false Give extended privileges to this container --privileged=false Give extended privileges to this container
--read-only=false Mount the container's root filesystem as read only --read-only=false Mount the container's root filesystem as read only
--restart="no" Restart policy (no, on-failure[:max-retry], always) --restart="no" Restart policy (no, on-failure[:max-retry], always)

View File

@ -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. the digest value is predictable and referenceable.
## PID settings (--pid) ## PID settings (--pid)
--pid="" : Set the PID (Process) Namespace mode for the container, --pid="" : Set the PID (Process) Namespace mode for the container,
'host': use the host's PID namespace inside 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 This command would allow you to use `strace` inside the container on pid 1234 on
the host. 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 settings (--ipc)
--ipc="" : Set the IPC mode for the container, --ipc="" : Set the IPC mode for the container,