mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-04-02 07:05:33 +00:00
Fix trailing whitespace
This commit is contained in:
@@ -37,7 +37,7 @@ graph TD
|
||||
Image[镜像层<br>ReadOnly]
|
||||
Writable --- Image
|
||||
end
|
||||
|
||||
|
||||
Lifecycle[生命周期 = 容器生命周期] -.-> Container
|
||||
Delete[容器删除] -->|导致| DataLost[数据丢失 ❌]
|
||||
```
|
||||
@@ -49,11 +49,11 @@ graph TD
|
||||
subgraph Container [容器]
|
||||
AppDir["/app/data"]
|
||||
end
|
||||
|
||||
|
||||
subgraph Volume [数据卷 my-data]
|
||||
Data[持久化数据]
|
||||
end
|
||||
|
||||
|
||||
AppDir == 挂载 ==> Volume
|
||||
Delete[容器删除] -.->|不会影响| Volume
|
||||
```
|
||||
|
||||
@@ -9,11 +9,11 @@ flowchart LR
|
||||
subgraph Host ["宿主机"]
|
||||
Dir1["/home/user/code/"]
|
||||
end
|
||||
|
||||
|
||||
subgraph Container ["容器"]
|
||||
Dir2["/usr/share/nginx/html/"]
|
||||
end
|
||||
|
||||
|
||||
Dir1 <-->|Bind Mount| Dir2
|
||||
```
|
||||
目录结构(同一份文件):
|
||||
@@ -210,7 +210,7 @@ $ docker inspect mycontainer --format '{{json .Mounts}}' | jq
|
||||
|
||||
```bash
|
||||
$ docker run --mount type=bind,source=/not/exist,target=/app nginx
|
||||
docker: Error response from daemon: invalid mount config for type "bind":
|
||||
docker: Error response from daemon: invalid mount config for type "bind":
|
||||
bind source path does not exist: /not/exist
|
||||
```
|
||||
**解决**:确保源路径存在,或改用 `-v` (会自动创建)
|
||||
|
||||
Reference in New Issue
Block a user