【发布时间】:2019-08-07 14:52:36
【问题描述】:
我有一个docker-compose.yml 文件,我正在使用 IntellJ 2019.2 来运行该服务,它运行良好。
我想通过 IntelliJ 查看容器的运行状况(启动、运行状况良好的 .etc)。
但是我找到的唯一方法是right-click on the container > inspect > search the state in the json,这不是很方便。
有没有人知道另一种轻松显示容器健康状态的方法?
检测出来的json:
[...]
"State": {
"Status": "running",
"Health": {
"Status": "healthy", // that's what I want
[...]
docker-compose 文件:
version: '3.4'
services:
application:
image: com.my.company/image
depends_on:
- database
build: ./build
ports:
- "8080:8080"
networks:
- app_network
healthcheck:
test: ["CMD", "curl", "-sSf", "http://localhost:8080/app"]
start_period: 30s
【问题讨论】:
标签: docker intellij-idea docker-compose health-monitoring