Feedback

Chat Icon

Painless Docker - 2nd Edition

A Comprehensive Guide to Mastering Docker and its Ecosystem

Docker Volumes & Data Management
39%

Listing and Inspecting Docker Volumes

We can list the volumes using the docker volume ls command:

docker volume ls

We can use filters such as dangling to list only dangling volumes:

docker volume ls -f dangling=true

We're going to understand what dangling volumes are in the next section.

To format the output, we can use the --format flag:

# List only volume names
docker volume ls --format "{{.Name}}"

# List volume names and drivers
docker volume ls --format "{{.Name}} {{.Driver}}"

# List volume names, drivers, and mount points

Painless Docker - 2nd Edition

A Comprehensive Guide to Mastering Docker and its Ecosystem

Enroll now to unlock all content and receive all future updates for free.

Unlock now  $31.99$25.59

Hurry! This limited time offer ends in:

To redeem this offer, copy the coupon code below and apply it at checkout:

Learn More