github.com/ld86/docker@v1.7.1-rc3/man/docker-exec.1.md (about) 1 % DOCKER(1) Docker User Manuals 2 % Docker Community 3 % JUNE 2014 4 # NAME 5 docker-exec - Run a command in a running container 6 7 # SYNOPSIS 8 **docker exec** 9 [**-d**|**--detach**[=*false*]] 10 [**--help**] 11 [**-i**|**--interactive**[=*false*]] 12 [**-t**|**--tty**[=*false*]] 13 [**-u**|**--user**[=*USER*]] 14 CONTAINER COMMAND [ARG...] 15 16 # DESCRIPTION 17 18 Run a process in a running container. 19 20 The command started using `docker exec` will only run while the container's primary 21 process (`PID 1`) is running, and will not be restarted if the container is restarted. 22 23 If the container is paused, then the `docker exec` command will wait until the 24 container is unpaused, and then run 25 26 # OPTIONS 27 **-d**, **--detach**=*true*|*false* 28 Detached mode: run command in the background. The default is *false*. 29 30 **--help** 31 Print usage statement 32 33 **-i**, **--interactive**=*true*|*false* 34 Keep STDIN open even if not attached. The default is *false*. 35 36 **-t**, **--tty**=*true*|*false* 37 Allocate a pseudo-TTY. The default is *false*. 38 39 **-u**, **--user**="" 40 Sets the username or UID used and optionally the groupname or GID for the specified command. 41 42 The followings examples are all valid: 43 --user [user | user:group | uid | uid:gid | user:gid | uid:group ] 44 45 Without this argument the command will be run as root in the container. 46 47 The **-t** option is incompatible with a redirection of the docker client 48 standard input. 49 50 # HISTORY 51 November 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>