Auto-sync: 2026-04-17 08:37
This commit is contained in:
30
wiki/concepts/Docker-Volume.md
Normal file
30
wiki/concepts/Docker-Volume.md
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
title: "Docker Volume"
|
||||
type: concept
|
||||
tags: [docker, volume, storage, persistence]
|
||||
last_updated: 2026-04-17
|
||||
---
|
||||
|
||||
## Definition
|
||||
Docker Volume(数据卷)是 Docker 容器持久化数据的机制,允许容器在重启后保留数据。
|
||||
|
||||
## Use Cases
|
||||
- 数据库数据持久化
|
||||
- 应用配置存储
|
||||
- 日志存储
|
||||
|
||||
## Commands
|
||||
```bash
|
||||
# 查看卷
|
||||
docker volume ls
|
||||
|
||||
# 删除卷
|
||||
docker volume rm <volume_name>
|
||||
|
||||
# 删除未使用的卷
|
||||
docker volume prune
|
||||
```
|
||||
|
||||
## Connections
|
||||
- [[Docker Volume]] ← used_by ← [[Portainer]]
|
||||
- [[Docker]] ← manages ← [[Docker Volume]]
|
||||
Reference in New Issue
Block a user