Updated test to check for `exec --privileged` side-effects

Also improving documentation for same feature as part of
docker/docker#14113 docs review.

Signed-off-by: Tim Dettrick <t.dettrick@uq.edu.au>
This commit is contained in:
Tim Dettrick 2015-06-22 13:06:07 +10:00 committed by Tibor Vass
parent d0fa83e285
commit e577c15cec
2 changed files with 7 additions and 7 deletions

View File

@ -17,7 +17,7 @@ weight=1
-d, --detach=false Detached mode: run command in the background -d, --detach=false Detached mode: run command in the background
-i, --interactive=false Keep STDIN open even if not attached -i, --interactive=false Keep STDIN open even if not attached
--privileged=false Give extended privileges to the command --privileged=false Give extended Linux capabilities to the command
-t, --tty=false Allocate a pseudo-TTY -t, --tty=false Allocate a pseudo-TTY
-u, --user= Username or UID (format: <name|uid>[:<group|gid>]) -u, --user= Username or UID (format: <name|uid>[:<group|gid>])
@ -53,4 +53,3 @@ This will create a new file `/tmp/execWorks` inside the running container
$ docker exec -it ubuntu_bash bash $ docker exec -it ubuntu_bash bash
This will create a new Bash session in the container `ubuntu_bash`. This will create a new Bash session in the container `ubuntu_bash`.

View File

@ -16,7 +16,7 @@ CONTAINER COMMAND [ARG...]
# DESCRIPTION # DESCRIPTION
Run a process in a running container. Run a process in a running container.
The command started using `docker exec` will only run while the container's primary The command started using `docker exec` will only run while the container's primary
process (`PID 1`) is running, and will not be restarted if the container is restarted. process (`PID 1`) is running, and will not be restarted if the container is restarted.
@ -35,11 +35,12 @@ container is unpaused, and then run
Keep STDIN open even if not attached. The default is *false*. Keep STDIN open even if not attached. The default is *false*.
**--privileged**=*true*|*false* **--privileged**=*true*|*false*
Give extended privileges to the process to run in a running container. The default is *false*. Give the process extended [Linux capabilities](http://man7.org/linux/man-pages/man7/capabilities.7.html)
when running in a container. The default is *false*.
By default, the process run by docker exec in a running container Without this flag, the process run by `docker exec` in a running container has
have the same capabilities of the container. By setting --privileged will give the same capabilities as the container, which may be limited. Set
all the capabilities to the process. `--privileged` to give all capabilities to the process.
**-t**, **--tty**=*true*|*false* **-t**, **--tty**=*true*|*false*
Allocate a pseudo-TTY. The default is *false*. Allocate a pseudo-TTY. The default is *false*.