github.com/robertojrojas/docker@v1.9.1/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  [**--privileged**[=*false*]]
    13  [**-t**|**--tty**[=*false*]]
    14  [**-u**|**--user**[=*USER*]]
    15  CONTAINER COMMAND [ARG...]
    16  
    17  # DESCRIPTION
    18  
    19  Run a process in a running container.
    20  
    21  The command started using `docker exec` will only run while the container's primary
    22  process (`PID 1`) is running, and will not be restarted if the container is restarted.
    23  
    24  If the container is paused, then the `docker exec` command will wait until the
    25  container is unpaused, and then run
    26  
    27  # OPTIONS
    28  **-d**, **--detach**=*true*|*false*
    29     Detached mode: run command in the background. The default is *false*.
    30  
    31  **--help**
    32    Print usage statement
    33  
    34  **-i**, **--interactive**=*true*|*false*
    35     Keep STDIN open even if not attached. The default is *false*.
    36  
    37  **--privileged**=*true*|*false*
    38     Give the process extended [Linux capabilities](http://man7.org/linux/man-pages/man7/capabilities.7.html)
    39  when running in a container. The default is *false*.
    40  
    41     Without this flag, the process run by `docker exec` in a running container has
    42  the same capabilities as the container, which may be limited. Set
    43  `--privileged` to give all capabilities to the process.
    44  
    45  **-t**, **--tty**=*true*|*false*
    46     Allocate a pseudo-TTY. The default is *false*.
    47  
    48  **-u**, **--user**=""
    49     Sets the username or UID used and optionally the groupname or GID for the specified command.
    50  
    51     The followings examples are all valid:
    52     --user [user | user:group | uid | uid:gid | user:gid | uid:group ]
    53  
    54     Without this argument the command will be run as root in the container.
    55  
    56  The **-t** option is incompatible with a redirection of the docker client
    57  standard input.
    58  
    59  # HISTORY
    60  November 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>