Skip to content

Feature request for docker --filter : ability to search by PORT number, exposed or published and all published #27178

@virtuman

Description

@virtuman

Just wanted to voice an idea to implement a couple of new --filter's in docker cli tool

Often, I find myself looking for containers that run or publish certain ports, or sometime find all containers that publish ports and filter out all containers that don't publish and don't expose ports.

Does anyone think that they could also benefit from something like that?

It should allow matches by complete number and/or support wildcard or regex in the search mask.
Proposed syntax:
docker ps --filter publishes=27017
docker ps --filter exposes=27017

docker ps --filter publishes=270*
docker ps --filter exposes=270*

docker ps --filter publishes=*
docker ps --filter exposes=*

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/cliClientkind/enhancementEnhancements are not bugs or new features but can improve usability or performance.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions