Skip to content

add more filters to docker ps [feature request] #13365

@dhrp

Description

@dhrp

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

references
I found this ticket: #11904 which describes something that sounds similar but (I think) is actually for the bash completion (only).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/apiAPIarea/cliClientkind/featureFunctionality or other elements that the project doesn't currently have. Features are new and shiny

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions