@@ -6,6 +6,12 @@ This is the equivalent of `docker exec` targeting a Compose service.
66With this subcommand, you can run arbitrary commands in your services. Commands allocate a TTY by default, so
77you can use a command such as ` docker compose exec web sh ` to get an interactive prompt.
88
9+ By default, Compose will enter container in interactive mode and allocate a TTY, while the equivalent ` docker exec `
10+ command requires passing ` --interactive --tty ` flags to get the same behavior. Compose also support those two flags
11+ to offer a smooth migration between commands, whenever they are no-op by default. Still, ` interactive ` can be used to
12+ force disabling interactive mode (` --interactive=false ` ), typically when ` docker compose exec ` command is used inside
13+ a script.
14+
915### Options
1016
1117| Name | Type | Default | Description |
@@ -28,3 +34,9 @@ This is the equivalent of `docker exec` targeting a Compose service.
2834
2935With this subcommand, you can run arbitrary commands in your services. Commands allocate a TTY by default, so
3036you can use a command such as ` docker compose exec web sh ` to get an interactive prompt.
37+
38+ By default, Compose will enter container in interactive mode and allocate a TTY, while the equivalent ` docker exec `
39+ command requires passing ` --interactive --tty ` flags to get the same behavior. Compose also support those two flags
40+ to offer a smooth migration between commands, whenever they are no-op by default. Still, ` interactive ` can be used to
41+ force disabling interactive mode (` --interactive=false ` ), typically when ` docker compose exec ` command is used inside
42+ a script.
0 commit comments