docker compose events

說明接收來自容器的即時事件
用法docker compose events [選項] [服務...]

說明

串流專案中每個容器的容器事件。

使用 --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"
    }
}

可以使用此指令接收的事件可以在此處查看。

選項

選項預設值說明
--json以 json 物件串流輸出事件