docker-client icon indicating copy to clipboard operation
docker-client copied to clipboard

Update `ListContainersParam` filters

Open johnflavin opened this issue 7 years ago • 6 comments

There are lots of new filters available when listing containers. From the latest swagger.yaml:

Filters to process on the container list, encoded as JSON (a map[string][]string). For example, {"status": ["paused"]} will only return paused containers.

  • ancestor=(<image-name>[:<tag>], <image id>, or <image@digest>)
  • before=(<container id> or <container name>)
  • expose=(<port>[/<proto>]|<startport-endport>/[<proto>])
  • exited=<int> containers with exit code of <int>
  • health=(starting|healthy|unhealthy|none)
  • id=<ID> a container's ID
  • isolation=(default|process|hyperv) (Windows daemon only)
  • is-task=(true|false)
  • label=key or label="key=value" of a container label
  • name=<name> a container's name
  • network=(<network id> or <network name>)
  • publish=(<port>[/<proto>]|<startport-endport>/[<proto>])
  • since=(<container id> or <container name>)
  • status=(created|restarting|running|removing|paused|exited|dead)
  • volume=(<volume name> or <mount point destination>)

We should add these new filters. Might also be nice to dig through the older docker API documentation, figure out when each filter was added, annotate the methods with javadoc @since (docker api version).

I think this should wait on #707, which refactors all the filter params.

johnflavin avatar Apr 03 '17 17:04 johnflavin

I also noticed some missing filters and was thinking about adding them. I'd like to take over that task.

albers avatar Apr 05 '17 07:04 albers

@johnflavin We can close this as #707 was merged, right?

davidxia avatar Jun 05 '17 18:06 davidxia

No, this is a different issue. #707 refactored all the existing filters to be a consistent style; its only additions were filters for networks. This issue is about adding new filters for containers.

johnflavin avatar Jun 06 '17 13:06 johnflavin

Ah I see. PRs are welcome then :)

davidxia avatar Nov 13 '17 19:11 davidxia

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 24 '18 14:09 stale[bot]

Hi @albers ,

Since this project went on mature status, please re-open this issue (if it still stands) to https://github.com/dmandalidis/docker-client. Thanks

dmandalidis avatar Oct 01 '19 20:10 dmandalidis