Docker Compose 事件

描述从容器接收实时事件
用法docker compose events [OPTIONS] [SERVICE...]

描述

流式传输项目中每个容器的容器事件。

使用--jsonflag 的 JSON 对象,则每行打印一个 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"
    }
}

在此处查看可使用 this 接收的事件。

选项

选择违约描述
--json将事件输出为 json 对象流