| 1 |
# docker compose events |
| 2 |
|
| 3 |
<!---MARKER_GEN_START--> |
| 4 |
Stream container events for every container in the project. |
| 5 |
|
| 6 |
With the `--json` flag, a json object is printed one per line with the format: |
| 7 |
|
| 8 |
```json |
| 9 |
{ |
| 10 |
"time": "2015-11-20T18:01:03.615550", |
| 11 |
"type": "container", |
| 12 |
"action": "create", |
| 13 |
"id": "213cf7...5fc39a", |
| 14 |
"service": "web", |
| 15 |
"attributes": { |
| 16 |
"name": "application_web_1", |
| 17 |
"image": "alpine:edge" |
| 18 |
} |
| 19 |
} |
| 20 |
``` |
| 21 |
|
| 22 |
The events that can be received using this can be seen [here](/reference/cli/docker/system/events/#object-types). |
| 23 |
|
| 24 |
### Options |
| 25 |
|
| 26 |
| Name | Type | Default | Description | |
| 27 |
|:------------|:---------|:--------|:------------------------------------------| |
| 28 |
| `--dry-run` | `bool` | | Execute command in dry run mode | |
| 29 |
| `--json` | `bool` | | Output events as a stream of json objects | |
| 30 |
| `--since` | `string` | | Show all events created since timestamp | |
| 31 |
| `--until` | `string` | | Stream events until this timestamp | |
| 32 |
|
| 33 |
|
| 34 |
<!---MARKER_GEN_END--> |
| 35 |
|
| 36 |
## Description |
| 37 |
|
| 38 |
Stream container events for every container in the project. |
| 39 |
|
| 40 |
With the `--json` flag, a json object is printed one per line with the format: |
| 41 |
|
| 42 |
```json |
| 43 |
{ |
| 44 |
"time": "2015-11-20T18:01:03.615550", |
| 45 |
"type": "container", |
| 46 |
"action": "create", |
| 47 |
"id": "213cf7...5fc39a", |
| 48 |
"service": "web", |
| 49 |
"attributes": { |
| 50 |
"name": "application_web_1", |
| 51 |
"image": "alpine:edge" |
| 52 |
} |
| 53 |
} |
| 54 |
``` |
| 55 |
|
| 56 |
The events that can be received using this can be seen [here](https://docs.docker.com/reference/cli/docker/system/events/#object-types). |