mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-11 04:14:38 +00:00
Fix ascii figures
This commit is contained in:
@@ -25,16 +25,18 @@ Docker 镜像并不是一个单纯的文件,而是由一组文件系统叠加
|
||||
|
||||
当容器启动时,Docker 会在镜像的最上层,添加一个新的**可写层(Writable Layer)**,通常被称为**容器层**。
|
||||
|
||||
```
|
||||
┌──────────────────────────────────────────────┐
|
||||
│ 容器层 (可写, Writable Container Layer) │ <-- 所有的写操作都在这里
|
||||
├──────────────────────────────────────────────┤
|
||||
│ 镜像层 (只读, Read-only Image Layer) │
|
||||
├──────────────────────────────────────────────┤
|
||||
│ 镜像层 (只读, Read-only Image Layer) │
|
||||
├──────────────────────────────────────────────┤
|
||||
│ 基础镜像层 (只读, Base Image Layer) │
|
||||
└──────────────────────────────────────────────┘
|
||||
```mermaid
|
||||
flowchart TD
|
||||
subgraph Container ["运行中的容器"]
|
||||
direction TB
|
||||
L4["容器层 (可写, Writable Container Layer)"]
|
||||
L3["镜像层 (只读, Read-only Image Layer)"]
|
||||
L2["镜像层 (只读, Read-only Image Layer)"]
|
||||
L1["基础镜像层 (只读, Base Image Layer)"]
|
||||
|
||||
L4 --- L3 --- L2 --- L1
|
||||
end
|
||||
Note["所有的写操作都在容器层这里"] -.-> L4
|
||||
```
|
||||
|
||||
* **读取文件**:当容器需要读取文件时,Docker 会从最上层(容器层)开始向下层(镜像层)寻找,直到找到该文件为止。
|
||||
|
||||
Reference in New Issue
Block a user