2022-03-09 12:57:07 +01:00
|
|
|
# docker compose ps
|
|
|
|
|
|
|
|
<!---MARKER_GEN_START-->
|
|
|
|
List containers
|
|
|
|
|
|
|
|
### Options
|
|
|
|
|
|
|
|
| Name | Type | Default | Description |
|
|
|
|
| --- | --- | --- | --- |
|
|
|
|
| `-a`, `--all` | | | Show all stopped containers (including those created by the run command) |
|
|
|
|
| `--format` | `string` | `pretty` | Format the output. Values: [pretty \| json] |
|
|
|
|
| `-q`, `--quiet` | | | Only display IDs |
|
|
|
|
| `--services` | | | Display services |
|
|
|
|
| `--status` | `stringArray` | | Filter services by status. Values: [paused \| restarting \| removing \| running \| dead \| created \| exited] |
|
|
|
|
|
|
|
|
|
|
|
|
<!---MARKER_GEN_END-->
|
2021-03-11 16:20:30 +01:00
|
|
|
|
|
|
|
## Description
|
|
|
|
|
2021-06-08 09:39:49 +02:00
|
|
|
Lists containers for a Compose project, with current status and exposed ports.
|
|
|
|
|
2021-09-13 17:14:32 +02:00
|
|
|
```console
|
2021-06-08 09:39:49 +02:00
|
|
|
$ docker compose ps
|
|
|
|
NAME SERVICE STATUS PORTS
|
|
|
|
example_foo_1 foo running (healthy) 0.0.0.0:8000->80/tcp
|
2022-03-09 13:24:09 +01:00
|
|
|
example_bar_1 bar exited (1)
|
2021-09-13 17:14:32 +02:00
|
|
|
```
|