mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-08-10 08:27:25 +00:00
Fix trailing whitespace
This commit is contained in:
+5
-5
@@ -93,19 +93,19 @@ Docker 会检测镜像是否有容器依赖或其他标签指向,只有在确
|
||||
```mermaid
|
||||
flowchart TD
|
||||
Start(["docker rmi redis:alpine"]) --> Step1
|
||||
|
||||
|
||||
subgraph Process ["删除流程"]
|
||||
direction TB
|
||||
Step1["1. Untag:移除 redis:alpine 标签"] --> Step2
|
||||
|
||||
|
||||
Step2{"2. 检查是否还有其他标签指向此镜像"}
|
||||
Step2 -- "有" --> Keep1["只 Untag,不删除"]
|
||||
Step2 -- "无" --> Step3
|
||||
|
||||
|
||||
Step3{"3. 检查是否有容器依赖"}
|
||||
Step3 -- "有" --> Error["报错,无法删除"]
|
||||
Step3 -- "无" --> Step4
|
||||
|
||||
|
||||
Step4{"4. 从上到下逐层删除,检查每层是否被其他镜像使用"}
|
||||
Step4 -- "被使用" --> Keep2["保留该层"]
|
||||
Step4 -- "未使用" --> Delete["Deleted (删除该层)"]
|
||||
@@ -172,7 +172,7 @@ $ docker image prune -a --filter "until=168h" # 7天前
|
||||
|
||||
```bash
|
||||
$ docker rmi nginx
|
||||
Error: conflict: unable to remove repository reference "nginx"
|
||||
Error: conflict: unable to remove repository reference "nginx"
|
||||
(must force) - container abc123 is using its referenced image
|
||||
```
|
||||
**解决方案**:
|
||||
|
||||
Reference in New Issue
Block a user