-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Closed
Labels
area/apiAPIAPIarea/cliClientClientkind/featureFunctionality or other elements that the project doesn't currently have. Features are new and shinyFunctionality or other elements that the project doesn't currently have. Features are new and shiny
Description
For day-to-day use and simple scripting purposes It'd be great if the --filter function was extended with filters on more columns.
Specifically:
$ docker ps --filter image=myname/test
Would be great so we can kill all our tests in one go like so:
$ docker ps --filter image=myname/test -q | xargs docker rm -f
This is helpful specifically in this combination because I want only image id's to be returned, and |grep thus doesn't work.
Other filters that would make sense to me:
For images
- Repository (with tag)
- Age? (--filter agemore=4h --filter ageless=2w)
For containers
- Image (with tag)
- Name (this is implemented by the way docker ps -aq --filter "name=rancher" >> what is the logic? #10897, but undocumented)
- Age? (as above)
- Status (running, exited, etc)
references
I found this ticket: #11904 which describes something that sounds similar but (I think) is actually for the bash completion (only).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/apiAPIAPIarea/cliClientClientkind/featureFunctionality or other elements that the project doesn't currently have. Features are new and shinyFunctionality or other elements that the project doesn't currently have. Features are new and shiny