Add security note

This commit is contained in:
Baohua Yang
2026-02-28 14:28:38 -08:00
parent 70cab9e92d
commit 0ff67cc893
16 changed files with 115 additions and 23 deletions

View File

@@ -138,9 +138,11 @@ $ docker run -d \
| 特性 | --mount | -v |
|------|---------|-----|
| 语法 | 键值对更清晰 | 冒号分隔更简洁 |
| 自动创建卷 | source 不存在会报错 | 自动创建 |
| 自动创建卷 | source 不存在会自动创建 | 自动创建 |
| 推荐程度 | 推荐 (更明确)| 常用 (更简洁)|
> **提示**很多人误以为 `--mount` 遇到目标不存在时总是报错实际上那仅适用于**绑定挂载 (Bind Mount)**对于**数据卷 (Volume)**只要 `source` 指定的卷名称不存在Docker 都会默默将其创建出来
#### 只读挂载
```bash