spotify/docker-client

Update `ListContainersParam` filters

Open

#710 创建于 2017年4月3日

在 GitHub 查看
 (6 评论) (2 反应) (0 负责人)Java (1,430 star) (551 fork)batch import
enhancementhelp wantedpinned

描述

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.

贡献者指南

Update `ListContainersParam` filters · spotify/docker-client#710 | Good First Issue