diff options
| author | Misty Stanley-Jones <misty@apache.org> | 2017-04-03 16:54:34 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-03 16:54:34 -0700 |
| commit | 473c5701cb66403b0535a5c01845cb0f27fbeb47 (patch) | |
| tree | 9a40326ad4b426655abca7377dc30da003847d4d /docs/reference/commandline/service_ls.md | |
| parent | ce07fb6b0f1b8765b92022e45f96bd4349812e06 (diff) | |
| parent | 71e6babfa2598669218177b5b429e873b7f35e8f (diff) | |
| download | docker-1.13.x.tar.gz | |
Merge pull request #32332 from mstanleyjones/1.13.x1.13.x
Cherry-pick command-line ref improvements
Diffstat (limited to 'docs/reference/commandline/service_ls.md')
| -rw-r--r-- | docs/reference/commandline/service_ls.md | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/docs/reference/commandline/service_ls.md b/docs/reference/commandline/service_ls.md index ccd68af750..c6c2ace11e 100644 --- a/docs/reference/commandline/service_ls.md +++ b/docs/reference/commandline/service_ls.md @@ -29,12 +29,18 @@ Options: -q, --quiet Only display IDs ``` +## Description + This command when run targeting a manager, lists services are running in the swarm. +## Examples + On a manager node: + ```bash $ docker service ls + ID NAME MODE REPLICAS IMAGE c8wgl7q4ndfd frontend replicated 5/5 nginx:alpine dmu1ept4cxcf redis replicated 3/3 redis:3.0.6 @@ -44,7 +50,7 @@ iwe3278osahj mongo global 7/7 mongo:3.3 The `REPLICAS` column shows both the *actual* and *desired* number of tasks for the service. -## Filtering +### Filtering The filtering flag (`-f` or `--filter`) format is of "key=value". If there is more than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`) @@ -55,7 +61,7 @@ The currently supported filters are: * [label](service_ls.md#label) * [name](service_ls.md#name) -#### ID +#### id The `id` filter matches all or part of a service's id. @@ -65,7 +71,7 @@ ID NAME MODE REPLICAS IMAGE 0bcjwfh8ychr redis replicated 1/1 redis:3.0.6 ``` -#### Label +#### label The `label` filter matches services based on the presence of a `label` alone or a `label` and a value. @@ -91,7 +97,7 @@ ID NAME MODE REPLICAS IMAGE 74nzcxxjv6fq backend replicated 3/3 redis:3.0.6 ``` -#### Name +#### name The `name` filter matches on all or part of a service's name. @@ -103,7 +109,7 @@ ID NAME MODE REPLICAS IMAGE 0bcjwfh8ychr redis replicated 1/1 redis:3.0.6 ``` -## Related information +## Related commands * [service create](service_create.md) * [service inspect](service_inspect.md) |
