1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Update docs for node filter of docker service ps

As is specified in 26964, it is possible to specify
a filter based on the node name or node ID.

This fix updates the related docs for that.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
Yong Tang 2016-09-29 18:55:52 -07:00
parent 1d669d82c1
commit c326e0afe3
3 changed files with 17 additions and 2 deletions

View file

@ -5095,7 +5095,7 @@ List tasks
- `id=<task id>` - `id=<task id>`
- `name=<task name>` - `name=<task name>`
- `service=<service name>` - `service=<service name>`
- `node=<node id>` - `node=<node id or name>`
- `label=key` or `label="key=value"` - `label=key` or `label="key=value"`
- `desired-state=(running | shutdown | accepted)` - `desired-state=(running | shutdown | accepted)`

View file

@ -5262,7 +5262,7 @@ List tasks
- `id=<task id>` - `id=<task id>`
- `name=<task name>` - `name=<task name>`
- `service=<service name>` - `service=<service name>`
- `node=<node id>` - `node=<node id or name>`
- `label=key` or `label="key=value"` - `label=key` or `label="key=value"`
- `desired-state=(running | shutdown | accepted)` - `desired-state=(running | shutdown | accepted)`

View file

@ -61,6 +61,7 @@ The currently supported filters are:
* [id](#id) * [id](#id)
* [name](#name) * [name](#name)
* [node](#node)
* [desired-state](#desired-state) * [desired-state](#desired-state)
@ -86,6 +87,20 @@ redis.1.0qihejybwf1x5vqi8lgzlgnpq redis:3.0.6 manager1 Running Runnin
``` ```
#### Node
The `node` filter matches on a node name or a node ID.
```bash
$ docker service ps -f "node=manager1" redis
NAME IMAGE NODE DESIRED STATE CURRENT STATE
redis.1.0qihejybwf1x5vqi8lgzlgnpq redis:3.0.6 manager1 Running Running 8 seconds
redis.5.1x0v8yomsncd6sbvfn0ph6ogc redis:3.0.6 manager1 Running Running 8 seconds
redis.9.3w1wu13yuplna8ri3fx47iwad redis:3.0.6 manager1 Running Running 8 seconds
redis.10.8eaxrb2fqpbnv9x30vr06i6vt redis:3.0.6 manager1 Running Running 8 seconds
```
#### desired-state #### desired-state
The `desired-state` filter can take the values `running`, `shutdown`, and `accepted`. The `desired-state` filter can take the values `running`, `shutdown`, and `accepted`.