Add blank lines before headers

This commit is contained in:
yeasy
2026-03-21 12:57:51 -07:00
parent 0648f63979
commit 312f8fea42
76 changed files with 411 additions and 0 deletions

View File

@@ -78,6 +78,7 @@ HEALTHCHECK NONE
使用 `curl` `wget`
```docker
## 使用 curl
HEALTHCHECK CMD curl -f http://localhost/ || exit 1
@@ -90,6 +91,7 @@ HEALTHCHECK CMD wget -q --spider http://localhost/ || exit 1
#### 数据库
```docker
## MySQL
HEALTHCHECK CMD mysqladmin ping -h localhost || exit 1
@@ -143,6 +145,7 @@ services:
### 7.12.7 查看健康状态
```bash
## 查看容器状态(包含健康信息)
$ docker ps
@@ -184,6 +187,7 @@ $ docker inspect --format '{{json .State.Health}}' mycontainer | jq
应用启动可能需要时间 ( Java 应用)设置 `--start-period` 可以防止在启动阶段因检查失败而误判
```docker
## 给应用 1 分钟启动时间
HEALTHCHECK --start-period=60s CMD curl -f http://localhost/ || exit 1