Reduce image size

This commit is contained in:
Baohua Yang
2026-02-27 19:23:28 -08:00
parent bbfc9d34ff
commit 19aaad591c
25 changed files with 52 additions and 28 deletions

View File

@@ -7,18 +7,24 @@ Bind Mount (绑定挂载) 将 **宿主机的目录或文件** 直接挂载到容
```mermaid
flowchart LR
subgraph Host ["宿主机"]
direction TB
Dir1["/home/user/code/<br/>├── index.html<br/>├── style.css<br/>└── app.js"]
Dir1["/home/user/code/"]
end
subgraph Container ["容器"]
direction TB
Dir2["/usr/share/nginx/html/<br/>(同一份文件)"]
Dir2["/usr/share/nginx/html/"]
end
Dir1 <-->|Bind Mount| Dir2
```
目录结构同一份文件
```text
/home/user/code/ (或 /usr/share/nginx/html/)
├── index.html
├── style.css
└── app.js
```
---
### 8.2.2 Bind Mount vs Volume