Reformat filtering options in ps ref

Signed-off-by: Misty Stanley-Jones <misty@docker.com>
This commit is contained in:
Misty Stanley-Jones 2017-06-21 10:31:03 -07:00
parent edfc89f4de
commit 0888df3058

View File

@ -82,20 +82,21 @@ than one filter, then pass multiple flags (e.g. `--filter "foo=bar" --filter "bi
The currently supported filters are: The currently supported filters are:
* id (container's id) | Filter | Description |
* label (`label=<key>` or `label=<key>=<value>`) |:----------------------|:-------------------------------------------------------------------------------------------------------------------------------------|
* name (container's name) | `id` | container's ID |
* exited (int - the code of exited containers. Only useful with `--all`) | `name` | container's name |
* status (`created|restarting|running|removing|paused|exited|dead`) | `label` | An arbitrary string representing either a key or a key-value pair |
* ancestor (`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) - filters containers that were created from the given image or a descendant. | `exited` | An integer representing the container's exit code. Only useful with `--all`. |
* before (container's id or name) - filters containers created before given id or name | `status` | One of `created|restarting|running|removing|paused|exited|dead` |
* since (container's id or name) - filters containers created since given id or name | `ancestor` | Filters containers which share a given image as an ancestor. Expressed as `<image-name>[:<tag>]`, `<image id>`, or `<image@digest>` |
* isolation (`default|process|hyperv`) (Windows daemon only) | `before` or `since` | Filters containers created before or after a given container ID or name |
* volume (volume name or mount point) - filters containers that mount volumes. | `volume` | Filters running containers which have mounted a given volume or bind mount. |
* network (network id or name) - filters containers connected to the provided network | `network` | Filters running containers connected to a given network. |
* health (starting|healthy|unhealthy|none) - filters containers based on healthcheck status | `publish` or `expose` | Filters containers which publish or expose a given port. |
* publish=(container's published port) - filters published ports by containers | `health` | One of `starting|healthy|unhealthy|none`. Filters containers based on their healthcheck status. |
* expose=(container's exposed port) - filters exposed ports by containers | `isolation` | Windows daemon only. One of `default|process|hyperv`. |
#### label #### label
@ -387,21 +388,21 @@ template.
Valid placeholders for the Go template are listed below: Valid placeholders for the Go template are listed below:
Placeholder | Description | Placeholder | Description |
--------------|---------------------------------------------------------------------------------------------------- |:--------------|:------------------------------------------------------------------------------------------------|
`.ID` | Container ID | `.ID` | Container ID |
`.Image` | Image ID | `.Image` | Image ID |
`.Command` | Quoted command | `.Command` | Quoted command |
`.CreatedAt` | Time when the container was created. | `.CreatedAt` | Time when the container was created. |
`.RunningFor` | Elapsed time since the container was started. | `.RunningFor` | Elapsed time since the container was started. |
`.Ports` | Exposed ports. | `.Ports` | Exposed ports. |
`.Status` | Container status. | `.Status` | Container status. |
`.Size` | Container disk size. | `.Size` | Container disk size. |
`.Names` | Container names. | `.Names` | Container names. |
`.Labels` | All labels assigned to the container. | `.Labels` | All labels assigned to the container. |
`.Label` | Value of a specific label for this container. For example `'{{.Label "com.docker.swarm.cpu"}}'` | `.Label` | Value of a specific label for this container. For example `'{{.Label "com.docker.swarm.cpu"}}'` |
`.Mounts` | Names of the volumes mounted in this container. | `.Mounts` | Names of the volumes mounted in this container. |
`.Networks` | Names of the networks attached to this container. | `.Networks` | Names of the networks attached to this container. |
When using the `--format` option, the `ps` command will either output the data When using the `--format` option, the `ps` command will either output the data
exactly as the template declares or, when using the `table` directive, includes exactly as the template declares or, when using the `table` directive, includes
@ -429,4 +430,4 @@ a87ecb4f327c com.docker.swarm.node=ubuntu,com.docker.swarm.storage=ssd
01946d9d34d8 01946d9d34d8
c1d3b0166030 com.docker.swarm.node=debian,com.docker.swarm.cpu=6 c1d3b0166030 com.docker.swarm.node=debian,com.docker.swarm.cpu=6
41d50ecd2f57 com.docker.swarm.node=fedora,com.docker.swarm.cpu=3,com.docker.swarm.storage=ssd 41d50ecd2f57 com.docker.swarm.node=fedora,com.docker.swarm.cpu=3,com.docker.swarm.storage=ssd
``` ```