Update API history and man page for `--filter expose/publish`

This fix updates API history and man page for
`docker ps --filter expose/publish`, from the feedback:
https://github.com/docker/docker/pull/27557#issuecomment-276832876

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
Yong Tang 2017-02-01 19:05:54 -08:00 committed by Tibor Vass
parent f1cef9c7ab
commit d77db0bd9a
1 changed files with 14 additions and 0 deletions

View File

@ -16,6 +16,8 @@ Filter output based on these conditions:
- volume=(<volume-name>|<mount-point-destination>) - volume=(<volume-name>|<mount-point-destination>)
- network=(<network-name>|<network-id>) - containers connected to the provided network - network=(<network-name>|<network-id>) - containers connected to the provided network
- health=(starting|healthy|unhealthy|none) - filters containers based on healthcheck status - health=(starting|healthy|unhealthy|none) - filters containers based on healthcheck status
- publish=(<port>[/<proto>]|<startport-endport>/[<proto>]) - filters containers based on published ports
- expose=(<port>[/<proto>]|<startport-endport>/[<proto>]) - filters containers based on exposed ports
## Format ## Format
@ -94,3 +96,15 @@ Filter output based on these conditions:
$ docker container ls --filter volume=/data --format "table {{.ID}}\t{{.Mounts}}" $ docker container ls --filter volume=/data --format "table {{.ID}}\t{{.Mounts}}"
CONTAINER ID MOUNTS CONTAINER ID MOUNTS
9c3527ed70ce remote-volume 9c3527ed70ce remote-volume
## Display containers that have published port of 80:
$ docker ps --filter publish=80
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
fc7e477723b7 busybox "top" About a minute ago Up About a minute 0.0.0.0:32768->80/tcp admiring_roentgen
## Display containers that have exposed TCP port in the range of `8000-8080`:
$ docker ps --filter expose=8000-8080/tcp
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9833437217a5 busybox "top" 21 seconds ago Up 19 seconds 8080/tcp dreamy_mccarthy