github.com/sld880311/docker@v0.0.0-20200524143708-d5593973a475/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 --with-registry-auth Send registry authentication details to Swarm agents 34 ``` 35 36 ## Description 37 38 Create and update a stack from a `compose` or a `dab` file on the swarm. This command 39 has to be run targeting a manager node. 40 41 ## Examples 42 43 ### Compose file 44 45 The `deploy` command supports compose file version `3.0` and above. 46 47 ```bash 48 $ docker stack deploy --compose-file docker-compose.yml vossibility 49 50 Ignoring unsupported options: links 51 52 Creating network vossibility_vossibility 53 Creating network vossibility_default 54 Creating service vossibility_nsqd 55 Creating service vossibility_logstash 56 Creating service vossibility_elasticsearch 57 Creating service vossibility_kibana 58 Creating service vossibility_ghollector 59 Creating service vossibility_lookupd 60 ``` 61 62 You can verify that the services were correctly created 63 64 ```bash 65 $ docker service ls 66 67 ID NAME MODE REPLICAS IMAGE 68 29bv0vnlm903 vossibility_lookupd replicated 1/1 nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662 69 4awt47624qwh vossibility_nsqd replicated 1/1 nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662 70 4tjx9biia6fs vossibility_elasticsearch replicated 1/1 elasticsearch@sha256:12ac7c6af55d001f71800b83ba91a04f716e58d82e748fa6e5a7359eed2301aa 71 7563uuzr9eys vossibility_kibana replicated 1/1 kibana@sha256:6995a2d25709a62694a937b8a529ff36da92ebee74bafd7bf00e6caf6db2eb03 72 9gc5m4met4he vossibility_logstash replicated 1/1 logstash@sha256:2dc8bddd1bb4a5a34e8ebaf73749f6413c101b2edef6617f2f7713926d2141fe 73 axqh55ipl40h vossibility_vossibility-collector replicated 1/1 icecrime/vossibility-collector@sha256:f03f2977203ba6253988c18d04061c5ec7aab46bca9dfd89a9a1fa4500989fba 74 ``` 75 76 ### DAB file 77 78 ```bash 79 $ docker stack deploy --bundle-file vossibility-stack.dab vossibility 80 81 Loading bundle from vossibility-stack.dab 82 Creating service vossibility_elasticsearch 83 Creating service vossibility_kibana 84 Creating service vossibility_logstash 85 Creating service vossibility_lookupd 86 Creating service vossibility_nsqd 87 Creating service vossibility_vossibility-collector 88 ``` 89 90 You can verify that the services were correctly created: 91 92 ```bash 93 $ docker service ls 94 95 ID NAME MODE REPLICAS IMAGE 96 29bv0vnlm903 vossibility_lookupd replicated 1/1 nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662 97 4awt47624qwh vossibility_nsqd replicated 1/1 nsqio/nsq@sha256:eeba05599f31eba418e96e71e0984c3dc96963ceb66924dd37a47bf7ce18a662 98 4tjx9biia6fs vossibility_elasticsearch replicated 1/1 elasticsearch@sha256:12ac7c6af55d001f71800b83ba91a04f716e58d82e748fa6e5a7359eed2301aa 99 7563uuzr9eys vossibility_kibana replicated 1/1 kibana@sha256:6995a2d25709a62694a937b8a529ff36da92ebee74bafd7bf00e6caf6db2eb03 100 9gc5m4met4he vossibility_logstash replicated 1/1 logstash@sha256:2dc8bddd1bb4a5a34e8ebaf73749f6413c101b2edef6617f2f7713926d2141fe 101 axqh55ipl40h vossibility_vossibility-collector replicated 1/1 icecrime/vossibility-collector@sha256:f03f2977203ba6253988c18d04061c5ec7aab46bca9dfd89a9a1fa4500989fba 102 ``` 103 104 ## Related commands 105 106 * [stack config](stack_config.md) 107 * [stack deploy](stack_deploy.md) 108 * [stack ls](stack_ls.md) 109 * [stack ps](stack_ps.md) 110 * [stack rm](stack_rm.md) 111 * [stack services](stack_services.md)