mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-13 13:21:18 +00:00
style(docs): standardize heading formats and numbering
- Enforce Level 1-3 structural numbering based on SUMMARY.md hierarchy - Remove structural numbering from Level 4+ headings - Eliminate single child headings by converting to bold text - Auto-inject summary text for headings with multiple children missing intro text - Exclude Appendix chapters from structural numbering - Avoid modifying code block contents - Add script to detect non-standard English usage in headers
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
本节涵盖了相关内容与详细描述,主要探讨以下几个方面:
|
||||
|
||||
### 基本语法
|
||||
### 7.12.1 基本语法
|
||||
|
||||
如下代码块所示,展示了相关示例:
|
||||
|
||||
@@ -15,7 +15,7 @@ HEALTHCHECK NONE
|
||||
|
||||
---
|
||||
|
||||
### 为什么需要 HEALTHCHECK
|
||||
### 7.12.2 为什么需要 HEALTHCHECK
|
||||
|
||||
在没有 HEALTHCHECK 之前,Docker 只能通过 **进程退出码** 来判断容器状态。**问题场景**:
|
||||
|
||||
@@ -35,7 +35,7 @@ Starting ──成功──> Healthy ──失败N次──> Unhealthy
|
||||
|
||||
---
|
||||
|
||||
### 基本用法
|
||||
### 7.12.3 基本用法
|
||||
|
||||
本节涵盖了相关内容与详细描述,主要探讨以下几个方面:
|
||||
|
||||
@@ -70,7 +70,7 @@ HEALTHCHECK --interval=30s --timeout=3s --retries=3 \
|
||||
|
||||
---
|
||||
|
||||
### 屏蔽健康检查
|
||||
### 7.12.4 屏蔽健康检查
|
||||
|
||||
如果基础镜像定义了 HEALTHCHECK,但你不想使用它:
|
||||
|
||||
@@ -81,7 +81,7 @@ HEALTHCHECK NONE
|
||||
|
||||
---
|
||||
|
||||
### 常见检查脚本
|
||||
### 7.12.5 常见检查脚本
|
||||
|
||||
本节涵盖了相关内容与详细描述,主要探讨以下几个方面:
|
||||
|
||||
@@ -124,7 +124,7 @@ HEALTHCHECK CMD ["healthcheck.sh"]
|
||||
|
||||
---
|
||||
|
||||
### 在 Compose 中使用
|
||||
### 7.12.6 在 Compose 中使用
|
||||
|
||||
可以在 `compose.yaml` (或 `docker-compose.yml`) 中覆盖或定义健康检查:
|
||||
|
||||
@@ -156,7 +156,7 @@ services:
|
||||
|
||||
---
|
||||
|
||||
### 查看健康状态
|
||||
### 7.12.7 查看健康状态
|
||||
|
||||
运行以下命令:
|
||||
|
||||
@@ -187,7 +187,7 @@ $ docker inspect --format '{{json .State.Health}}' mycontainer | jq
|
||||
|
||||
---
|
||||
|
||||
### 最佳实践
|
||||
### 7.12.8 最佳实践
|
||||
|
||||
本节涵盖了相关内容与详细描述,主要探讨以下几个方面:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user