github.com/flavio/docker@v0.1.3-0.20170117145210-f63d1a6eec47/docs/reference/commandline/stack_services.md (about) 1 --- 2 title: "stack services" 3 description: "The stack services command description and usage" 4 keywords: "stack, services" 5 advisory: "experimental" 6 --- 7 8 <!-- This file is maintained within the docker/docker Github 9 repository at https://github.com/docker/docker/. Make all 10 pull requests against that repo. If you see this file in 11 another repository, consider it read-only there, as it will 12 periodically be overwritten by the definitive file. Pull 13 requests which include edits to this file in other repositories 14 will be rejected. 15 --> 16 17 # stack services (experimental) 18 19 ```markdown 20 Usage: docker stack services [OPTIONS] STACK 21 22 List the services in the stack 23 24 Options: 25 -f, --filter value Filter output based on conditions provided 26 --help Print usage 27 -q, --quiet Only display IDs 28 ``` 29 30 Lists the services that are running as part of the specified stack. This 31 command has to be run targeting a manager node. 32 33 For example, the following command shows all services in the `myapp` stack: 34 35 ```bash 36 $ docker stack services myapp 37 38 ID NAME REPLICAS IMAGE COMMAND 39 7be5ei6sqeye myapp_web 1/1 nginx@sha256:23f809e7fd5952e7d5be065b4d3643fbbceccd349d537b62a123ef2201bc886f 40 dn7m7nhhfb9y myapp_db 1/1 mysql@sha256:a9a5b559f8821fe73d58c3606c812d1c044868d42c63817fa5125fd9d8b7b539 41 ``` 42 43 ## Filtering 44 45 The filtering flag (`-f` or `--filter`) format is a `key=value` pair. If there 46 is more than one filter, then pass multiple flags (e.g. `--filter "foo=bar" --filter "bif=baz"`). 47 Multiple filter flags are combined as an `OR` filter. 48 49 The following command shows both the `web` and `db` services: 50 51 ```bash 52 $ docker stack services --filter name=myapp_web --filter name=myapp_db myapp 53 54 ID NAME REPLICAS IMAGE COMMAND 55 7be5ei6sqeye myapp_web 1/1 nginx@sha256:23f809e7fd5952e7d5be065b4d3643fbbceccd349d537b62a123ef2201bc886f 56 dn7m7nhhfb9y myapp_db 1/1 mysql@sha256:a9a5b559f8821fe73d58c3606c812d1c044868d42c63817fa5125fd9d8b7b539 57 ``` 58 59 The currently supported filters are: 60 61 * id / ID (`--filter id=7be5ei6sqeye`, or `--filter ID=7be5ei6sqeye`) 62 * name (`--filter name=myapp_web`) 63 * label (`--filter label=key=value`) 64 65 ## Related information 66 67 * [stack deploy](stack_deploy.md) 68 * [stack ls](stack_ls.md) 69 * [stack ps](stack_ps.md) 70 * [stack rm](stack_rm.md)