mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-11 04:14:38 +00:00
chore: remove unused historic image files
This commit is contained in:
@@ -197,11 +197,13 @@ $ docker inspect mycontainer --format '{{json .Mounts}}' | jq
|
||||
|
||||
### VOLUME vs docker run -v
|
||||
|
||||
相关信息如下表:
|
||||
|
||||
| 特性 | Dockerfile VOLUME | docker run -v |
|
||||
|------|-------------------|---------------|
|
||||
| **定义时机** | 镜像构建时 | 容器运行时 |
|
||||
| **默认行为** | 创建匿名卷 | 可指定命名卷或路径 |
|
||||
| **灵活性** | 低(固定路径) | 高(可任意指定) |
|
||||
| **灵活性** | 低 (固定路径)| 高 (可任意指定)|
|
||||
| **适用场景** | 定义必须持久化的路径 | 灵活的数据管理 |
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user