docker - 如何在 IntelliJ 中显示 docker 容器的运行状况?
问题描述
我有一个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
[...]
码头工人撰写文件:
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
解决方案
有一个显示健康状态的功能请求: https ://youtrack.jetbrains.com/issue/IDEA-214513
推荐阅读
- php - 柏林的 PHP 时间已关闭
- c - 为什么我在这段代码中得到一个奇怪的数字?
- algorithm - 有向图可以分成两组,使得组内的节点不相互连接吗?
- react-native - 从父组件导航到特定组件(React Native Navigation)
- roblox - Roblox Studio 如何在零件尺寸达到特定数字时做到这一点
- java - 如何仅重新运行失败的测试?(我用junit5+maven+springboot)
- javascript - 续集选择查询问题
- asp.net - 如果路由参数末尾有空格,我的页面返回404?
- r - 有条件地删除 R 中的某些行
- javascript - 由 Ajax URL 请求调用时,Bootstrap 3 未加载所有类,但有些已执行