github.com/brahmaroutu/docker@v1.2.1-0.20160809185609-eb28dde01f16/docs/reference/commandline/stack_services.md (about)

     1  <!--[metadata]>
     2  +++
     3  title = "stack services"
     4  description = "The stack services command description and usage"
     5  keywords = ["stack, services"]
     6  advisory = "experimental"
     7  [menu.main]
     8  parent = "smn_cli"
     9  +++
    10  <![end-metadata]-->
    11  
    12  # stack services (experimental)
    13  
    14  ```markdown
    15  Usage:	docker stack services [OPTIONS] STACK
    16  
    17  List the services in the stack
    18  
    19  Options:
    20    -f, --filter value   Filter output based on conditions provided
    21        --help           Print usage
    22    -q, --quiet          Only display IDs
    23  ```
    24  
    25  Lists the services that are running as part of the specified stack. This
    26  command has to be run targeting a manager node.
    27  
    28  For example, the following command shows all services in the `myapp` stack:
    29  
    30  ```bash
    31  $ docker stack services myapp
    32  
    33  ID            NAME            REPLICAS  IMAGE                                                                          COMMAND
    34  7be5ei6sqeye  myapp_web       1/1       nginx@sha256:23f809e7fd5952e7d5be065b4d3643fbbceccd349d537b62a123ef2201bc886f
    35  dn7m7nhhfb9y  myapp_db        1/1       mysql@sha256:a9a5b559f8821fe73d58c3606c812d1c044868d42c63817fa5125fd9d8b7b539
    36  ```
    37  
    38  ## Filtering
    39  
    40  The filtering flag (`-f` or `--filter`) format is a `key=value` pair. If there
    41  is more than one filter, then pass multiple flags (e.g. `--filter "foo=bar" --filter "bif=baz"`).
    42  Multiple filter flags are combined as an `OR` filter. 
    43  
    44  The following command shows both the `web` and `db` services:
    45  
    46  ```bash
    47  $ docker stack services --filter name=myapp_web --filter name=myapp_db myapp
    48  
    49  ID            NAME            REPLICAS  IMAGE                                                                          COMMAND
    50  7be5ei6sqeye  myapp_web       1/1       nginx@sha256:23f809e7fd5952e7d5be065b4d3643fbbceccd349d537b62a123ef2201bc886f
    51  dn7m7nhhfb9y  myapp_db        1/1       mysql@sha256:a9a5b559f8821fe73d58c3606c812d1c044868d42c63817fa5125fd9d8b7b539
    52  ```
    53  
    54  The currently supported filters are:
    55  
    56  * id / ID (`--filter id=7be5ei6sqeye`, or `--filter ID=7be5ei6sqeye`)
    57  * name (`--filter name=myapp_web`)
    58  * label (`--filter label=key=value`)
    59  
    60  ## Related information
    61  
    62  * [stack config](stack_config.md)
    63  * [stack deploy](stack_deploy.md)
    64  * [stack rm](stack_rm.md)
    65  * [stack tasks](stack_tasks.md)