docker volume
Docker :, and
Syntax
docker volume <COMMAND>
Parameters
| Parameters | Description | Examples | Level |
|---|---|---|---|
create |
docker volume create my-data |
Common | |
ls |
docker volume ls |
Common | |
inspect |
docker volume inspect my-data |
Common | |
rm |
docker volume rm my-data |
Common | |
prune |
docker volume prune |
Common |
Examples
docker volume create postgres-data
Docker,
docker run -d -v postgres-data:/var/lib/postgresql/data postgres:15
docker volume inspect postgres-data
Mountpoint
docker volume prune
,
Common Errors
Error: volume is in use,
Error: No such volume, docker volume ls
Tips
- and more
- docker volume prune
- bind mount(-v /host/path:/container/path),