mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 15:02:09 +02:00
docker-volume: add page (#7771)
This commit is contained in:
parent
4cc80092f9
commit
ae90383189
1 changed files with 36 additions and 0 deletions
36
pages/common/docker-volume.md
Normal file
36
pages/common/docker-volume.md
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
# docker volume
|
||||||
|
|
||||||
|
> Manage Docker volumes.
|
||||||
|
> More information: <https://docs.docker.com/engine/reference/commandline/volume/>.
|
||||||
|
|
||||||
|
- Create a volume:
|
||||||
|
|
||||||
|
`docker volume create {{volume_name}}`
|
||||||
|
|
||||||
|
- Create a volume with a specific label:
|
||||||
|
|
||||||
|
`docker volume create --label {{label}} {{volume_name}}`
|
||||||
|
|
||||||
|
- Create a `tmpfs` volume a size of 100 MiB and an uid of 1000:
|
||||||
|
|
||||||
|
`docker volume create --opt {{type}}={{tmpfs}} --opt {{device}}={{tmpfs}} --opt {{o}}={{size=100m,uid=1000}} {{volume_name}}`
|
||||||
|
|
||||||
|
- List all volumes:
|
||||||
|
|
||||||
|
`docker volume ls`
|
||||||
|
|
||||||
|
- Remove a volume:
|
||||||
|
|
||||||
|
`docker volume rm {{volume_name}}`
|
||||||
|
|
||||||
|
- Display information about a volume:
|
||||||
|
|
||||||
|
`docker volume inspect {{volume_name}}`
|
||||||
|
|
||||||
|
- Remove all unused local volumes:
|
||||||
|
|
||||||
|
`docker volume prune`
|
||||||
|
|
||||||
|
- Display help for a subcommand:
|
||||||
|
|
||||||
|
`docker volume {{subcommand}} --help`
|
Loading…
Add table
Reference in a new issue