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