File: exec.md

package info (click to toggle)
docker.io 27.5.1%2Bdfsg4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 67,384 kB
  • sloc: sh: 5,847; makefile: 1,146; ansic: 664; python: 162; asm: 133
file content (26 lines) | stat: -rw-r--r-- 1,318 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# docker exec

<!---MARKER_GEN_START-->
Execute a command in a running container

### Aliases

`docker container exec`, `docker exec`

### Options

| Name                  | Type     | Default | Description                                            |
|:----------------------|:---------|:--------|:-------------------------------------------------------|
| `-d`, `--detach`      | `bool`   |         | Detached mode: run command in the background           |
| `--detach-keys`       | `string` |         | Override the key sequence for detaching a container    |
| `-e`, `--env`         | `list`   |         | Set environment variables                              |
| `--env-file`          | `list`   |         | Read in a file of environment variables                |
| `-i`, `--interactive` | `bool`   |         | Keep STDIN open even if not attached                   |
| `--privileged`        | `bool`   |         | Give extended privileges to the command                |
| `-t`, `--tty`         | `bool`   |         | Allocate a pseudo-TTY                                  |
| `-u`, `--user`        | `string` |         | Username or UID (format: `<name\|uid>[:<group\|gid>]`) |
| `-w`, `--workdir`     | `string` |         | Working directory inside the container                 |


<!---MARKER_GEN_END-->