mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-11 04:14:38 +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 @@
|
||||
|
||||
当不再需要某个镜像时,我们可以将其删除以释放存储空间。本节介绍删除镜像的常用方法。
|
||||
|
||||
### 基本用法
|
||||
### 4.3.1 基本用法
|
||||
|
||||
使用 `docker image rm` 删除本地镜像:
|
||||
|
||||
@@ -14,7 +14,7 @@ $ docker image rm [选项] <镜像1> [<镜像2> ...]
|
||||
|
||||
---
|
||||
|
||||
### 镜像标识方式
|
||||
### 4.3.2 镜像标识方式
|
||||
|
||||
删除镜像时,可以使用多种方式指定镜像:
|
||||
|
||||
@@ -70,7 +70,7 @@ $ docker rmi nginx@sha256:b4f0e0bdeb578043c1ea6862f0d40cc4afe32a4a582f3be235a3b1
|
||||
|
||||
---
|
||||
|
||||
### 理解输出信息
|
||||
### 4.3.3 理解输出信息
|
||||
|
||||
执行删除命令后,Docker 会输出一系列的操作记录,理解这些信息有助于我们掌握镜像删除的机制。
|
||||
|
||||
@@ -122,7 +122,7 @@ flowchart TD
|
||||
|
||||
---
|
||||
|
||||
### 批量删除
|
||||
### 4.3.4 批量删除
|
||||
|
||||
手动一个一个删除镜像非常繁琐,Docker 提供了 `image prune` 命令和 shell 组合命令来实现批量清理。
|
||||
|
||||
@@ -178,7 +178,7 @@ $ docker image prune -a --filter "until=168h" # 7天前
|
||||
|
||||
---
|
||||
|
||||
### 删除失败的常见原因
|
||||
### 4.3.5 删除失败的常见原因
|
||||
|
||||
在删除镜像时,Docker 可能会提示错误并拒绝执行。这通常是为了防止误删正在使用的资源。
|
||||
|
||||
@@ -236,7 +236,7 @@ Error: image has dependent child images
|
||||
|
||||
---
|
||||
|
||||
### 常用过滤条件
|
||||
### 4.3.6 常用过滤条件
|
||||
|
||||
相关信息如下表:
|
||||
|
||||
@@ -250,7 +250,7 @@ Error: image has dependent child images
|
||||
|
||||
---
|
||||
|
||||
### 清理策略
|
||||
### 4.3.7 清理策略
|
||||
|
||||
针对不同的环境 (开发环境 vs 生产环境),我们应该采用不同的镜像清理策略。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user