-
Notifications
You must be signed in to change notification settings - Fork 1.1k
docker volume ls -f dangling=true
returns all volumes
#1849
Comments
docker volumes ls -f dangling=true
returns all volumesdocker volume ls -f dangling=true
returns all volumes
@emrob thanks for reporting. Swarm does not support volume filters right now, so the output you're seeing makes sense. We're still working on supporting new Docker options with Swarm. Do you have a strong requirement for this feature right now? |
@nishanttotla This feature would be very convenient to have, but I can work around it for now. Thanks! |
@emrob I've been investigating it, and it's slightly more complex to implement than just a simple filtering, because the underlying client Swarm uses doesn't support filtering yet. I'll still try to see if there's an easy way to do it for now. |
We'll be able to filter volumes once #1879 is through. This is scheduled for the 1.2 release. |
As for me, I want to use this feature for cleaning up unused images in swarm cluster. docker -H :4000 rmi $(docker -H :4000 images --filter "dangling=true" -q --no-trunc) |
@nishanttotla I see that #1879 was closed a while back but this apparently still doesn't work... in my case |
Filter for dangling images in progress here #2831 |
Description: Filtering doesn't work for the
docker volume ls
command when run via the Swarm manager. All volumes are returned, regardless of whetherdangling=true
ordangling=false
.System info:
Steps to reproduce:
Results:
When
docker volume ls -f dangling=true
is run via the Swarm manager, all volumes are returned (including theused
volume mounted by the busybox container). Whendocker volume ls -f dangling=true
is run on the node with the busybox container, theused
volume is not listed in the output (as expected).Expected results:
When
docker volume ls -f dangling=true
is run via the Swarm manager, volumes that are in use (in this case theused
volume) should not be returned.The text was updated successfully, but these errors were encountered: