Difference between revisions of "Docker volume ls"
Jump to navigation
Jump to search
(28 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | <code>[[docker volume]] ls</code> https://docs.docker.com/engine/reference/commandline/volume_ls/ | + | {{lc}}<code>[[docker volume]] ls</code> List all the volumes known to [[Docker]] |
+ | * https://docs.docker.com/engine/reference/commandline/volume_ls/ | ||
+ | |||
+ | * <code>[[docker volume]] ls</code> | ||
+ | * <code>[[docker volume ls --format]]</code> | ||
+ | * <code>[[docker volume ls --help]]</code> | ||
== Examples == | == Examples == | ||
+ | |||
+ | [[docker volume]] ls | ||
+ | DRIVER VOLUME NAME | ||
+ | local 0a92e3e2af047db06a590cf0d3164f4a6e039158abab8d4d8e4f0b84e7add2cb | ||
+ | local 1e7c62f7b303215a8e12be9ce49ff9a3ea866d44ecfbe8030e6064eb39378d43 | ||
+ | local 1e9458c18988bf76a6b5186a86a1f9d0b18b0c0a9dccaa913f5bee213fcb8bc4 | ||
+ | local your_named_volume_1 | ||
+ | local your_named_volume_2 | ||
+ | |||
+ | docker volume ls | ||
+ | DRIVER VOLUME NAME | ||
+ | |||
+ | docker volume ls -f [[dangling]]=true | ||
+ | docker volume ls -f dangling=false | ||
+ | |||
+ | docker volume ls -f [[driver]]=local | ||
+ | |||
+ | |||
+ | Including [[Mountpoint]] | ||
+ | <pre>docker volume ls --format "{{.Driver}} {{.Name}} {{.Mountpoint}}"</pre> | ||
+ | |||
docker volume ls or docker volume list | docker volume ls or docker volume list | ||
Line 14: | Line 40: | ||
local 1e7c62f7b303215a8e12be9ce49ff9a3ea866d44ecfbe8030e6064eb39378d43 | local 1e7c62f7b303215a8e12be9ce49ff9a3ea866d44ecfbe8030e6064eb39378d43 | ||
local 1e9458c18988bf76a6b5186a86a1f9d0b18b0c0a9dccaa913f5bee213fcb8bc4 | local 1e9458c18988bf76a6b5186a86a1f9d0b18b0c0a9dccaa913f5bee213fcb8bc4 | ||
+ | |||
+ | |||
+ | docker volume ls --filter label=YOUR_LABEL | ||
+ | |||
+ | == Related commands == | ||
+ | * <code>[[docker system df -v]]</code> show docker [[disk usage]] | ||
+ | * <code>[[docker system prune]]</code> | ||
+ | * <code>[[docker system prune --volumes]]</code> | ||
+ | * <code>[[docker volume create]] --name VOLUME_NAME</code> | ||
+ | * <code>[[docker-compose]]</code> | ||
+ | * <code>[[docker inspect]]</code> | ||
+ | * <code>[[docker volume inspect]]</code> | ||
+ | * <code>[[podman volume ls]]</code> | ||
+ | Docker list volumes associated with all containers: | ||
+ | * <code><nowiki>docker ps -a --format '{{ .ID }}' | xargs -I {} docker inspect -f '{{ .Name }}{{ printf "\n" }}{{ range .Mounts }}{{ printf "\n\t" }}{{ .Type }} {{ if eq .Type "bind" }}{{ .Source }}{{ end }}{{ .Name }} => {{ .Destination }}{{ end }}{{ printf "\n" }}' {}</nowiki></code> | ||
+ | * [[mount]] | grep [[^/dev/]] | grep -v /etc | awk '{print $3}' | ||
== See also == | == See also == | ||
* {{Docker Volumes}} | * {{Docker Volumes}} | ||
− | * {{ | + | * {{du}} |
+ | |||
[[Category:Docker]] | [[Category:Docker]] |
Latest revision as of 23:07, 23 October 2023
docker volume ls
List all the volumes known to Docker
Examples[edit]
docker volume ls DRIVER VOLUME NAME local 0a92e3e2af047db06a590cf0d3164f4a6e039158abab8d4d8e4f0b84e7add2cb local 1e7c62f7b303215a8e12be9ce49ff9a3ea866d44ecfbe8030e6064eb39378d43 local 1e9458c18988bf76a6b5186a86a1f9d0b18b0c0a9dccaa913f5bee213fcb8bc4 local your_named_volume_1 local your_named_volume_2
docker volume ls DRIVER VOLUME NAME
docker volume ls -f dangling=true docker volume ls -f dangling=false
docker volume ls -f driver=local
Including Mountpoint
docker volume ls --format "{{.Driver}} {{.Name}} {{.Mountpoint}}"
docker volume ls or docker volume list DRIVER VOLUME NAME local elk_data01 local elk_data02 local elk_data03
docker volume ls DRIVER VOLUME NAME local 0a92e3e2af047db06a590cf0d3164f4a6e039158abab8d4d8e4f0b84e7add2cb local 1e7c62f7b303215a8e12be9ce49ff9a3ea866d44ecfbe8030e6064eb39378d43 local 1e9458c18988bf76a6b5186a86a1f9d0b18b0c0a9dccaa913f5bee213fcb8bc4
docker volume ls --filter label=YOUR_LABEL
Related commands[edit]
docker system df -v
show docker disk usagedocker system prune
docker system prune --volumes
docker volume create --name VOLUME_NAME
docker-compose
docker inspect
docker volume inspect
podman volume ls
Docker list volumes associated with all containers:
docker ps -a --format '{{ .ID }}' | xargs -I {} docker inspect -f '{{ .Name }}{{ printf "\n" }}{{ range .Mounts }}{{ printf "\n\t" }}{{ .Type }} {{ if eq .Type "bind" }}{{ .Source }}{{ end }}{{ .Name }} => {{ .Destination }}{{ end }}{{ printf "\n" }}' {}
- mount | grep ^/dev/ | grep -v /etc | awk '{print $3}'
See also[edit]
- Docker Volumes:
docker volume ls
,docker volume create
,docker volume inspect
,docker volumes prune
,docker volume create
,docker volume rm
,docker system df
,mounts
,--volumes-from
du, du -hs
, Disk space usage,df
,ls
,tree
,find
,docker system df
,journalctl --disk-usage
, No space left on device, ENOSPC,sar -F
,growpart
,resize2fs
, ncdu, duf, dua-cli
Advertising: