2021-03-08 15:47:24 +01:00
|
|
|
command: docker compose events
|
|
|
|
short: Receive real time events from containers.
|
2021-03-11 16:20:30 +01:00
|
|
|
long: |-
|
2022-07-26 14:58:08 +02:00
|
|
|
Stream container events for every container in the project.
|
2021-03-11 16:20:30 +01:00
|
|
|
|
2022-07-26 14:58:08 +02:00
|
|
|
With the `--json` flag, a json object is printed one per line with the format:
|
2021-03-11 16:20:30 +01:00
|
|
|
|
2022-07-26 14:58:08 +02:00
|
|
|
```json
|
|
|
|
{
|
|
|
|
"time": "2015-11-20T18:01:03.615550",
|
|
|
|
"type": "container",
|
|
|
|
"action": "create",
|
|
|
|
"id": "213cf7...5fc39a",
|
|
|
|
"service": "web",
|
|
|
|
"attributes": {
|
|
|
|
"name": "application_web_1",
|
|
|
|
"image": "alpine:edge"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
2021-03-11 16:20:30 +01:00
|
|
|
|
2022-07-26 14:58:08 +02:00
|
|
|
The events that can be received using this can be seen [here](/engine/reference/commandline/events/#object-types).
|
2022-08-02 13:11:57 +02:00
|
|
|
usage: docker compose events [OPTIONS] [SERVICE...]
|
2021-03-08 15:47:24 +01:00
|
|
|
pname: docker compose
|
|
|
|
plink: docker_compose.yaml
|
|
|
|
options:
|
2022-07-26 14:58:08 +02:00
|
|
|
- option: json
|
|
|
|
value_type: bool
|
|
|
|
default_value: "false"
|
|
|
|
description: Output events as a stream of json objects
|
|
|
|
deprecated: false
|
|
|
|
hidden: false
|
|
|
|
experimental: false
|
|
|
|
experimentalcli: false
|
|
|
|
kubernetes: false
|
|
|
|
swarm: false
|
2023-05-05 12:43:27 +02:00
|
|
|
inherited_options:
|
|
|
|
- option: dry-run
|
|
|
|
value_type: bool
|
|
|
|
default_value: "false"
|
|
|
|
description: Execute command in dry run mode
|
|
|
|
deprecated: false
|
|
|
|
hidden: false
|
|
|
|
experimental: false
|
|
|
|
experimentalcli: false
|
|
|
|
kubernetes: false
|
|
|
|
swarm: false
|
2021-03-08 15:47:24 +01:00
|
|
|
deprecated: false
|
2023-07-07 14:27:14 +02:00
|
|
|
hidden: false
|
2021-03-08 15:47:24 +01:00
|
|
|
experimental: false
|
|
|
|
experimentalcli: false
|
|
|
|
kubernetes: false
|
|
|
|
swarm: false
|
|
|
|
|