Add -u|--user
flag to docker exec for running command as a different user
Signed-off-by: Lei Jitang <leijitang@huawei.com>
This commit is contained in:
parent
a878ece032
commit
3ca275df6d
@ -407,7 +407,7 @@ _docker_events() {
|
|||||||
_docker_exec() {
|
_docker_exec() {
|
||||||
case "$cur" in
|
case "$cur" in
|
||||||
-*)
|
-*)
|
||||||
COMPREPLY=( $( compgen -W "--detach -d --help --interactive -i -t --tty" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "--detach -d --help --interactive -i -t --tty -u --user" -- "$cur" ) )
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
__docker_containers_running
|
__docker_containers_running
|
||||||
|
@ -1121,6 +1121,7 @@ You'll need two shells for this example.
|
|||||||
-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
|
||||||
-t, --tty=false Allocate a pseudo-TTY
|
-t, --tty=false Allocate a pseudo-TTY
|
||||||
|
-u, --user= Username or UID (format: <name|uid>[:<group|gid>])
|
||||||
|
|
||||||
The `docker exec` command runs a new command in a running container.
|
The `docker exec` command runs a new command in a running container.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user