docker container exec
Execute a command in a running container
Usage
docker container exec [OPTIONS] CONTAINER COMMAND [ARG...]
Description
See docker exec for more information.
Options
Option | Short | Default | Description |
---|---|---|---|
--detach | -d | Detached mode: run command in the background | |
--detach-keys | Override the key sequence for detaching a container | ||
--env | -e | API 1.25+ Set environment variables | |
--env-file | API 1.25+ Read in a file of environment variables | ||
--interactive | -i | Keep STDIN open even if not attached | |
--privileged | Give extended privileges to the command | ||
--tty | -t | Allocate a pseudo-TTY | |
--user | -u | Username or UID (format: <name|uid>[:<group|gid>] ) | |
--workdir | -w | API 1.35+ Working directory inside the container |