Description
Steps to reproduce the issue:
Once I create a bunch of volumes the docker volume rm command requires specifying the volume name(s) to remove these. Can a pattern be allowed so all volumes that match the pattern are removed by the volume provider (plugin).
This is a feature request to allow patterns to match volume names when removing a set of volumes. Presently dockz
Describe the results you received:
Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version
:
Client:
Version: 17.03.0-ce
API version: 1.26
Go version: go1.7.5
Git commit: 60ccb22
Built: Thu Feb 23 10:57:47 2017
OS/Arch: linux/amd64
Server:
Version: 17.03.0-ce
API version: 1.26 (minimum version 1.12)
Go version: go1.7.5
Git commit: 60ccb22
Built: Thu Feb 23 10:57:47 2017
OS/Arch: linux/amd64
Experimental: false
Output of docker info
:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 7
Server Version: 17.03.0-ce
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 147
Dirperm1 Supported: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local vsphere
Network: bridge host macvlan null overlay
Swarm: pending
NodeID: tszk3hjhbc79g5cmspfv6h3pz
Is Manager: false
Node Address: 10.110.48.54
Manager Addresses:
10.110.48.49:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 977c511eda0925a723debdc94d09459af49d082a
runc version: a01dafd48bc1c7cc12bdb01206f9fea7dd6feb70
init version: 949e6fa
Security Options:
apparmor
Kernel Version: 3.13.0-85-generic
Operating System: Ubuntu 14.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 1.955 GiB
Name: hte-1s-eng-dhcp98
ID: H3SC:SAIV:HFHW:WYI5:WC4O:GEVQ:S6AJ:VIJ2:4CVT:UXDQ:T4GW:7MCA
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: govin1
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Additional environment details (AWS, VirtualBox, physical, etc.):
Hello @govint thanks for your request.
I understand your use case but I am not sure if it really needs to be covered with a new feature.
The docker CLI is very powerful.
Let's suppose that you have this volumes
docker volume create ccc-hello
docker volume create ccc-ciao
docker volume create ccc-bye
you can filter them by name:
docker volume ls --filter name=ccc
And in the end remove them all together:
```
docker volume rm $(docker volume ls --filter name=ccc -q)
````
+1 to what @gianarb Said, I do not think we should support pattern matching in rm
.
Agree , I'll close this one.
Most helpful comment
Hello @govint thanks for your request.
I understand your use case but I am not sure if it really needs to be covered with a new feature.
The docker CLI is very powerful.
Let's suppose that you have this volumes
you can filter them by name:
And in the end remove them all together:
```
docker volume rm $(docker volume ls --filter name=ccc -q)
````