From d0fa83e2858bf70c697f3108083f357795b393b2 Mon Sep 17 00:00:00 2001 From: Tim Dettrick Date: Fri, 19 Jun 2015 16:01:50 +1000 Subject: [PATCH] Revert "Revert "Add docker exec run a command in privileged mode"" This reverts commit 40b71adee390e9c06471b89ed845132b4ec80177. Original commit (for which this is effectively a rebased version) is 72a500e9e5929b038816d8bd18d462a19e571c99 and was provided by Lei Jitang . Signed-off-by: Tim Dettrick --- contrib/completion/bash/docker | 2 +- docs/reference/commandline/exec.md | 1 + man/docker-exec.1.md | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index feeb7d4163..cafc8a6f97 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -675,7 +675,7 @@ _docker_exec() { case "$cur" in -*) - COMPREPLY=( $( compgen -W "--detach -d --help --interactive -i -t --tty -u --user" -- "$cur" ) ) + COMPREPLY=( $( compgen -W "--detach -d --help --interactive -i --privileged -t --tty -u --user" -- "$cur" ) ) ;; *) __docker_containers_running diff --git a/docs/reference/commandline/exec.md b/docs/reference/commandline/exec.md index 6ad6883ad6..b5ddc64dc7 100644 --- a/docs/reference/commandline/exec.md +++ b/docs/reference/commandline/exec.md @@ -17,6 +17,7 @@ weight=1 -d, --detach=false Detached mode: run command in the background -i, --interactive=false Keep STDIN open even if not attached + --privileged=false Give extended privileges to the command -t, --tty=false Allocate a pseudo-TTY -u, --user= Username or UID (format: [:]) diff --git a/man/docker-exec.1.md b/man/docker-exec.1.md index c1de7b59ed..312fa397f5 100644 --- a/man/docker-exec.1.md +++ b/man/docker-exec.1.md @@ -9,6 +9,7 @@ docker-exec - Run a command in a running container [**-d**|**--detach**[=*false*]] [**--help**] [**-i**|**--interactive**[=*false*]] +[**--privileged**[=*false*]] [**-t**|**--tty**[=*false*]] [**-u**|**--user**[=*USER*]] CONTAINER COMMAND [ARG...] @@ -33,6 +34,13 @@ container is unpaused, and then run **-i**, **--interactive**=*true*|*false* Keep STDIN open even if not attached. The default is *false*. +**--privileged**=*true*|*false* + Give extended privileges to the process to run in a running container. The default is *false*. + + By default, the process run by docker exec in a running container +have the same capabilities of the container. By setting --privileged will give +all the capabilities to the process. + **-t**, **--tty**=*true*|*false* Allocate a pseudo-TTY. The default is *false*.