diff options
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) |
