github.com/olljanat/moby@v1.13.1/docs/reference/commandline/deploy.md (about)

     1  ---
     2  title: "deploy"
     3  description: "The deploy command description and usage"
     4  keywords: "stack, deploy"
     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  # deploy (alias for stack deploy) (experimental)
    18  
    19  ```markdown
    20  Usage:  docker deploy [OPTIONS] STACK
    21  
    22  Deploy a new stack or update an existing stack
    23  
    24  Aliases:
    25    deploy, up
    26  
    27  Options:
    28        --bundle-file string    Path to a Distributed Application Bundle file
    29        --compose-file string   Path to a Compose file
    30        --help                  Print usage
    31        --with-registry-auth    Send registry authentication details to Swarm agents
    32  ```
    33  
    34  Create and update a stack from a `compose` or a `dab` file on the swarm. This command
    35  has to be run targeting a manager node.
    36  
    37  ## Compose file
    38  
    39  The `deploy` command supports compose file version `3.0` and above.
    40  
    41  ```bash
    42  $ docker stack deploy --compose-file docker-compose.yml vossibility
    43  Ignoring unsupported options: links
    44  
    45  Creating network vossibility_vossibility
    46  Creating network vossibility_default
    47  Creating service vossibility_nsqd
    48  Creating service vossibility_logstash
    49  Creating service vossibility_elasticsearch
    50  Creating service vossibility_kibana
    51  Creating service vossibility_ghollector
    52  Creating service vossibility_lookupd
    53  ```
    54  
    55  You can verify that the services were correctly created
    56  
    57  ```
    58  $ docker service ls
    59  ID            NAME                               MODE        REPLICAS  IMAGE
    60  29bv0vnlm903  vossibility_lookupd                replicated  1/1       nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662
    61  4awt47624qwh  vossibility_nsqd                   replicated  1/1       nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662
    62  4tjx9biia6fs  vossibility_elasticsearch          replicated  1/1       elasticsearch@sha256:12ac7c6af55d001f71800b83ba91a04f716e58d82e748fa6e5a7359eed2301aa
    63  7563uuzr9eys  vossibility_kibana                 replicated  1/1       kibana@sha256:6995a2d25709a62694a937b8a529ff36da92ebee74bafd7bf00e6caf6db2eb03
    64  9gc5m4met4he  vossibility_logstash               replicated  1/1       logstash@sha256:2dc8bddd1bb4a5a34e8ebaf73749f6413c101b2edef6617f2f7713926d2141fe
    65  axqh55ipl40h  vossibility_vossibility-collector  replicated  1/1       icecrime/vossibility-collector@sha256:f03f2977203ba6253988c18d04061c5ec7aab46bca9dfd89a9a1fa4500989fba
    66  ```
    67  
    68  ## DAB file
    69  
    70  ```bash
    71  $ docker stack deploy --bundle-file vossibility-stack.dab vossibility
    72  Loading bundle from vossibility-stack.dab
    73  Creating service vossibility_elasticsearch
    74  Creating service vossibility_kibana
    75  Creating service vossibility_logstash
    76  Creating service vossibility_lookupd
    77  Creating service vossibility_nsqd
    78  Creating service vossibility_vossibility-collector
    79  ```
    80  
    81  You can verify that the services were correctly created:
    82  
    83  ```bash
    84  $ docker service ls
    85  ID            NAME                               MODE        REPLICAS  IMAGE
    86  29bv0vnlm903  vossibility_lookupd                replicated  1/1       nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662
    87  4awt47624qwh  vossibility_nsqd                   replicated  1/1       nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662
    88  4tjx9biia6fs  vossibility_elasticsearch          replicated  1/1       elasticsearch@sha256:12ac7c6af55d001f71800b83ba91a04f716e58d82e748fa6e5a7359eed2301aa
    89  7563uuzr9eys  vossibility_kibana                 replicated  1/1       kibana@sha256:6995a2d25709a62694a937b8a529ff36da92ebee74bafd7bf00e6caf6db2eb03
    90  9gc5m4met4he  vossibility_logstash               replicated  1/1       logstash@sha256:2dc8bddd1bb4a5a34e8ebaf73749f6413c101b2edef6617f2f7713926d2141fe
    91  axqh55ipl40h  vossibility_vossibility-collector  replicated  1/1       icecrime/vossibility-collector@sha256:f03f2977203ba6253988c18d04061c5ec7aab46bca9dfd89a9a1fa4500989fba
    92  ```
    93  
    94  ## Related information
    95  
    96  * [stack config](stack_config.md)
    97  * [stack deploy](stack_deploy.md)
    98  * [stack ls](stack_ls.md)
    99  * [stack ps](stack_ps.md)
   100  * [stack rm](stack_rm.md)
   101  * [stack services](stack_services.md)