Use more accurate words

This commit is contained in:
Baohua Yang
2026-03-02 21:58:39 -08:00
parent 551dcfd2cb
commit 3af007b176
2 changed files with 13 additions and 16 deletions

View File

@@ -1,18 +1,12 @@
## 本章小结
| 要点 | 说明 |
|------|------|
| **作用** | 将宿主机目录挂载到容器 |
| **语法** | `-v /宿主机:/容器` `--mount type=bind,...` |
| **只读** | 添加 `readonly` `:ro` |
| **适用场景** | 开发环境配置文件日志 |
| **vs Volume** | Bind 更灵活Volume 更适合生产 |
本章介绍了 Docker 的三种数据管理方式数据卷 (Volume)绑定挂载 (Bind Mount) tmpfs 挂载
### 8.4.1 延伸阅读
- [数据卷](8.1_volume.md)Docker 管理的持久化存储
- [tmpfs 挂载](8.3_tmpfs.md)内存临时存储
- [Compose 数据管理](../11_compose/11.5_compose_file.md)Compose 中的挂载配置
| 方式 | 特点 | 适用场景 |
|------|------|---------|
| **数据卷 (Volume)** | Docker 管理生命周期独立于容器 | 数据库应用数据推荐生产环境 |
| **绑定挂载 (Bind Mount)** | 挂载宿主机目录更灵活 | 开发环境配置文件日志 |
| **tmpfs 挂载** | 仅存储在内存中容器停止即消失 | 临时敏感数据高速缓存 |
| 操作 | 命令 |
|------|------|
@@ -23,8 +17,10 @@
| 清理未用 | `docker volume prune` |
| 挂载数据卷 | `-v name:/path` `--mount source=name,target=/path` |
### 8.4.2 延伸阅读
### 延伸阅读
- [数据卷](8.1_volume.md)Docker 管理的持久化存储
- [绑定挂载](8.2_bind-mounts.md)挂载宿主机目录
- [tmpfs 挂载](8.3_tmpfs.md)内存中的临时存储
- [存储驱动](../12_implementation/12.4_ufs.md)Docker 存储的底层原理
- [Compose 数据管理](../11_compose/11.5_compose_file.md)Compose 中的挂载配置