{"id":665,"date":"2017-01-04T00:29:47","date_gmt":"2017-01-04T00:29:46","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/couchbase-cluster-docker-swarm-compose-machine\/"},"modified":"2017-01-04T00:29:47","modified_gmt":"2017-01-04T00:29:46","slug":"couchbase-cluster-docker-swarm-compose-machine","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/pt\/couchbase-cluster-docker-swarm-compose-machine\/","title":{"rendered":"Couchbase Cluster on Docker Swarm using Docker Compose and Docker Machine"},"content":{"rendered":"\n<p>This blog post will explain how to create and scale\u00a0a Couchbase Cluster using full armor of Docker &#8211; Docker Machine, <a href=\"https:\/\/www.couchbase.com\/blog\/deploy-docker-compose-services-swarm\/\">Docker Swarm and Docker Compose<\/a>. Here is what we&#8217;ll do:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create a 3-node Docker Swarm Cluster using Docker Machine<\/li>\n\n\n<li>Run\u00a0a Couchbase instance on two nodes<\/li>\n\n\n<li>Create a cluster<\/li>\n\n\n<li>Rebalance the cluster<\/li>\n\n\n<li>Scale and rebalance the cluster again<\/li>\n\n<\/ul>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2802\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-docker-swarm-0-1024x558-1.png\" alt=\" couchbase-docker-swarm-0-1024x558\" width=\"1024\" height=\"558\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Docker Swarm Cluster using Consul<\/h2>\n\n\n\n<p>Create a three-node Docker Swarm cluster using Docker Machine:<\/p>\n\n\n<p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]# Docker Machine for Consul<br \/>\ndocker-machine<br \/>\n   create<br \/>\n   -d virtualbox<br \/>\n   consul-machine<\/p>\n<p># Start Consul<br \/>\ndocker $(docker-machine config consul-machine) run -d &#8211;restart=always<br \/>\n         -p &#8220;8500:8500&#8221;<br \/>\n         -h &#8220;consul&#8221;<br \/>\n         progrium\/consul -server -bootstrap<\/p>\n<p># Docker Swarm master<br \/>\ndocker-machine<br \/>\n  create<br \/>\n  -d virtualbox<br \/>\n  &#8211;swarm<br \/>\n  &#8211;swarm-master<br \/>\n  &#8211;swarm-discovery=&#8221;consul:\/\/$(docker-machine ip consul-machine):8500&#8243;<br \/>\n  &#8211;engine-opt=&#8221;cluster-store=consul:\/\/$(docker-machine ip consul-machine):8500&#8243;<br \/>\n  &#8211;engine-opt=&#8221;cluster-advertise=eth1:2376&#8243;<br \/>\n  swarm-master<\/p>\n<p># Docker Swarm node-01<br \/>\ndocker-machine<br \/>\n  create<br \/>\n  -d virtualbox<br \/>\n  &#8211;swarm<br \/>\n  &#8211;swarm-discovery=&#8221;consul:\/\/$(docker-machine ip consul-machine):8500&#8243;<br \/>\n  &#8211;engine-opt=&#8221;cluster-store=consul:\/\/$(docker-machine ip consul-machine):8500&#8243;<br \/>\n  &#8211;engine-opt=&#8221;cluster-advertise=eth1:2376&#8243;<br \/>\n  swarm-node-01<\/p>\n<p># Docker Swarm node-02<br \/>\ndocker-machine<br \/>\n  create<br \/>\n  -d virtualbox<br \/>\n  &#8211;virtualbox-disk-size &#8220;5000&#8221;<br \/>\n  &#8211;swarm<br \/>\n  &#8211;swarm-discovery=&#8221;consul:\/\/$(docker-machine ip consul-machine):8500&#8243;<br \/>\n  &#8211;engine-opt=&#8221;cluster-store=consul:\/\/$(docker-machine ip consul-machine):8500&#8243;<br \/>\n  &#8211;engine-opt=&#8221;cluster-advertise=eth1:2376&#8243;<br \/>\n  swarm-node-02<\/p>\n<p># Configure to use Docker Swarm cluster<br \/>\neval &#8220;$(docker-machine env &#8211;swarm swarm-master)&#8221;[\/crayon]<\/p>\n\n\n\n<p><a href=\"https:\/\/docs.docker.com\/swarm\/provision-with-machine\/\">Provision a Swarm\u00a0cluster with Docker Machine<\/a>\u00a0provide more details about why and what&#8217;s done in this script. Here is a summary:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create a Docker Machine\u00a0and run Consul for service discovery<\/li>\n\n\n<li>Create three\u00a0Docker Machines &#8211; one for\u00a0Master and two for Worker nodes.Each machine is configured to be part of a Swarm cluster using <code>--swarm<\/code>. It also\u00a0uses the Consul service discovery specified using <code>--swarm-discovery<\/code>.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Couchbase Nodes on Docker Swarm<\/h2>\n\n\n\n<p>Create two instances of Couchbase using Docker Compose:<\/p>\n\n\n<p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]version: &#8220;2&#8221;<br \/>\nservices:<br \/>\n  db:<br \/>\n    image: arungupta\/couchbase<br \/>\n    network_mode: &#8220;host&#8221;<br \/>\n    ports:<br \/>\n      &#8211; 8091:8091<br \/>\n      &#8211; 8092:8092<br \/>\n      &#8211; 8093:8093<br \/>\n      &#8211; 11210:11210[\/crayon]<\/p>\n\n\n\n<p><code>arungupta\/couchbase<\/code> image is used here. This\u00a0image is defined at\u00a0<a href=\"https:\/\/github.com\/arun-gupta\/docker-images\/tree\/master\/couchbase\">Couchbase Docker Image.<\/a>\u00a0It uses the\u00a0<a href=\"https:\/\/hub.docker.com\/_\/couchbase\/\">Official Couchbase Docker Image<\/a>\u00a0add<br>\nconfigures it as explained:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Setups memory for Index and Data<\/li>\n\n\n<li>Configures the Couchbase server with Index, Data, and Query service<\/li>\n\n\n<li>Sets up username and password credentials<\/li>\n\n\n<li>Loads the <code>travel-sample<\/code> bucket<\/li>\n\n<\/ol>\n\n\n\n<p>Compose file uses <code>host<\/code> network. This is equivalent to using <code>--net=host<\/code> on docker run CLI.\u00a0It\u00a0allows the container to use the host networking stack.\u00a0It also limits\u00a0only a single Couchbase container to run on<br>\na single Docker Machine. So this\u00a0means that our Couchbase cluster can scale based upon the number of Docker Machines &#8211; 3 in our case. The exact command to use this Compose file is:<\/p>\n\n\n<p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]docker-compose scale db=2<br \/>\nWARNING: The &#8220;db&#8221; service specifies a port on the host. If multiple containers for this service are created on a single host, the port will clash.<br \/>\nCreating and starting couchbasedockerswarm_db_1 &#8230;<br \/>\nCreating and starting couchbasedockerswarm_db_2 &#8230;<br \/>\nPulling db (arungupta\/couchbase:latest)&#8230;<br \/>\nswarm-node-02: Pulling arungupta\/couchbase:latest&#8230;<br \/>\nswarm-master: Pulling arungupta\/couchbase:latest&#8230;<br \/>\nswarm-node-01: Pulling arungupta\/couchbase:latest&#8230;<br \/>\nPulling db (arungupta\/couchbase:latest)&#8230;<br \/>\nswarm-node-02: Pulling arungupta\/couchbase:latest&#8230; : downloaded<br \/>\nCreating and starting couchbasedockerswarm_db_1 &#8230; done<br \/>\nCreating and starting couchbasedockerswarm_db_2 &#8230; done[\/crayon]<\/p>\n\n\n\n<p>There are three\u00a0nodes in the Docker Swarm cluster. The <a href=\"https:\/\/docs.docker.com\/swarm\/scheduler\/strategy\/\">default\u00a0scheduler strategy<\/a> is <code>spread<\/code> and so the containers will be spread\u00a0on different hosts. This is evident<br>\nby <code>docker ps<\/code>:<\/p>\n\n\n<p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]docker ps<br \/>\nCONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS              PORTS               NAMES<br \/>\n4c8c149f4e34        arungupta\/couchbase   &#8220;\/entrypoint.sh \/opt\/&#8221;   44 seconds ago      Up 44 seconds                           swarm-node-02\/couchbasedockerswarm_db_1<br \/>\nd3b6a1dbddb5        arungupta\/couchbase   &#8220;\/entrypoint.sh \/opt\/&#8221;   44 seconds ago      Up 44 seconds                           swarm-node-01\/couchbasedockerswarm_db_2[\/crayon]<\/p>\n\n\n\n<p>Note, one Couchbase server is running on <code>swarm-node-01<\/code> and another on <code>swarm-node-02<\/code>. Each server is configured with\u00a0an administrator username <code>Administrator<\/code> and password\u00a0<code>password<\/code>. Find out\u00a0IP<br>\naddress of the Docker Machine:<\/p>\n\n\n<p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]docker-machine ls<br \/>\nNAME             ACTIVE      DRIVER       STATE     URL                         SWARM                   DOCKER    ERRORS<br \/>\nconsul-machine   &#8211;           virtualbox   Running   tcp:\/\/192.168.99.106:2376                           v1.11.1<br \/>\ndefault          &#8211;           virtualbox   Running   tcp:\/\/192.168.99.100:2376                           v1.11.0<br \/>\nswarm-master     * (swarm)   virtualbox   Running   tcp:\/\/192.168.99.107:2376   swarm-master (master)   v1.11.1<br \/>\nswarm-node-01    &#8211;           virtualbox   Running   tcp:\/\/192.168.99.108:2376   swarm-master            v1.11.1<br \/>\nswarm-node-02    &#8211;           virtualbox   Running   tcp:\/\/192.168.99.109:2376   swarm-master            v1.11.1[\/crayon]<\/p>\n\n\n\n<p>If you have <a href=\"https:\/\/stedolan.github.io\/jq\/download\/\">jq\u00a0installed<\/a>\u00a0then IP address can be conveniently found as:<\/p>\n\n\n<p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]docker-machine inspect swarm-node-01 | jq &#8220;.Driver.IPAddress&#8221;<br \/>\n&#8220;192.168.99.108&#8221;[\/crayon]<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Couchbase Cluster on Docker Swarm<\/h2>\n\n\n\n<p>All Couchbase server nodes are created equal.\u00a0This allows the Couchbase cluster to truly scale horizontally to meet your growing application demands. Independently running Couchbase nodes can be added to a\u00a0cluster\u00a0by invoking the <code>server-add<\/code> CLI command. This is typically a two step process. The first step is adding one or more nodes. The second step then rebalances the cluster where the data on the existing nodes is rebalanced across the updated cluster. In our case, a single Couchbase<br>\ncontainer is\u00a0running on each Docker Machine. Lets pick\u00a0IP address of any one\u00a0Couchbase node, and add IP address of the other node:<\/p>\n\n\n<p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]docker run -it arungupta\/couchbase<br \/>\ncouchbase-cli<br \/>\nserver-add<br \/>\n&#8211;cluster=`docker-machine inspect swarm-node-01 | jq -r &#8220;.Driver.IPAddress&#8221;`:8091<br \/>\n&#8211;user Administrator<br \/>\n&#8211;password password<br \/>\n&#8211;server-add=`docker-machine inspect swarm-node-02 | jq -r &#8220;.Driver.IPAddress&#8221;`<br \/>\n&#8211;server-add-username=Administrator<br \/>\n&#8211;server-add-password=password<br \/>\nSUCCESS: server-add 192.168.99.109:8091<br \/>\n[\/crayon]<\/p>\n\n\n\n<p>Couchbase Web Console for both the nodes will show a similar output:<br>\n<a href=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-docker-swarm-1-1024x375-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-13965\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-docker-swarm-1-1024x375-1.png\" alt=\"couchbase-docker-swarm-1\" width=\"604\" height=\"221\"><\/a><br>\n<a href=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-docker-swarm-2-1024x519-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-13966\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-docker-swarm-2-1024x519-1.png\" alt=\"couchbase-docker-swarm-2\" width=\"604\" height=\"306\"><\/a><br>\nThis shows that the two nodes now form a cluster, and needs to be rebalanced.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Rebalance Couchbase Cluster<\/h2>\n\n\n\n<p>Now, lets rebalance the cluster:<\/p>\n\n\n<p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]docker run -it arungupta\/couchbase couchbase-cli rebalance &#8211;cluster=`docker-machine inspect swarm-node-01 | jq -r &#8220;.Driver.IPAddress&#8221;`:8091 &#8211;user Administrator &#8211;password password<br \/>\nINFO: rebalancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .<br \/>\nSUCCESS: rebalanced cluster[\/crayon]<\/p>\n\n\n\n<p>Couchbase Web Console will be updated to show that rebalance is happening:<br>\n<a href=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-docker-swarm-3-1024x392-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-13967\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-docker-swarm-3-1024x392-1.png\" alt=\"couchbase-docker-swarm-3\" width=\"604\" height=\"231\"><\/a><br>\nAnd finally you&#8217;ll see a rebalanced cluster:<\/p>\n\n\n\n<p><a href=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-docker-swarm-4-1024x386-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-13968\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-docker-swarm-4-1024x386-1.png\" alt=\"couchbase-docker-swarm-4\" width=\"604\" height=\"228\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Scale and Rebalance Couchbase Cluster<\/h2>\n\n\n\n<p>Scale the Couchbase cluster:<\/p>\n\n\n<p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]docker-compose scale db=3<br \/>\nWARNING: The &#8220;db&#8221; service specifies a port on the host. If multiple containers for this service are created on a single host, the port will clash.<br \/>\nCreating and starting couchbasedockerswarm_db_3 &#8230; done[\/crayon]<\/p>\n\n\n\n<p>Check that the container is running on a different Docker Machine:<\/p>\n\n\n<p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]docker ps<br \/>\nCONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS              PORTS               NAMES<br \/>\n02f94e2bbd3e        arungupta\/couchbase   &#8220;\/entrypoint.sh \/opt\/&#8221;   9 seconds ago       Up 8 seconds                            swarm-master\/couchbasedockerswarm_db_3<br \/>\n4c8c149f4e34        arungupta\/couchbase   &#8220;\/entrypoint.sh \/opt\/&#8221;   About an hour ago   Up About an hour                        swarm-node-02\/couchbasedockerswarm_db_1<br \/>\nd3b6a1dbddb5        arungupta\/couchbase   &#8220;\/entrypoint.sh \/opt\/&#8221;   About an hour ago   Up About an hour                        swarm-node-01\/couchbasedockerswarm_db_2[\/crayon]<\/p>\n\n\n\n<p>As mentioned earlier, scaling a Couchbase cluster is a two-step process. This is so because typically you&#8217;ll add multiple servers and then rebalance the cluster. However, in cases where you only need to add a single\u00a0Couchbase\u00a0node and then rebalance,<br>\nthe rebalance command\u00a0can be used\u00a0achieve that. In our case, this is done as shown:<\/p>\n\n\n\n<p><p>[crayon lang=&#8221;default&#8221; decode=&#8221;true&#8221;]version: &#8220;2&#8221;<br \/>\nservices:<br \/>\n  db:<br \/>\n    image: arungupta\/couchbase<br \/>\n    network_mode: &#8220;host&#8221;<br \/>\n    ports:<br \/>\n      &#8211; 8091:8091<br \/>\n      &#8211; 8092:8092<br \/>\n      &#8211; 8093:8093<br \/>\n      &#8211; 11210:11210[\/crayon]<\/p>\n0<\/p>\n\n\n\n<p>The rebalanced cluster\u00a0now looks like:<br>\n<a href=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-docker-swarm-5-1024x409-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-13971\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-docker-swarm-5-1024x409-1.png\" alt=\"couchbase-docker-swarm-5\" width=\"604\" height=\"241\"><\/a><\/p>\n\n\n\n<p>This blog showed how you\u00a0can easily create and scale a Couchbase Cluster using Docker Swarm, Machine and Compose. Enjoy! Further reading &#8230;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/introduction\/intro.html\">Couchbase Server Developer Portal<\/a><\/li>\n\n\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/concepts\/concepts-intro.html\">Couchbase Server Concepts<\/a><\/li>\n\n\n<li><a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/4.1\/clustersetup\/manage-cluster-intro.html\">Couchbase Cluster Setup<\/a><\/li>\n\n\n<li>Questions on <a href=\"https:\/\/stackoverflow.com\/questions\/tagged\/couchbase\">StackOverflow,<\/a>\u00a0<a href=\"https:\/\/www.couchbase.com\/forums\/\">Forums<\/a>\u00a0or <a href=\"https:\/\/couchbase-community.slack.com\/\">Slack Channel<\/a><\/li>\n\n\n<li>Follow us\u00a0<a href=\"https:\/\/twitter.com\/couchbasedev\">@couchbasedev<\/a><\/li>\n\n\n<li><a href=\"https:\/\/www.couchbase.com\/next\/\">Couchbase 4.5 Beta<\/a><\/li>\n\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This blog post will explain how to create and scale\u00a0a Couchbase Cluster using full armor of Docker &#8211; Docker Machine, Docker Swarm and Docker Compose. Here is what we&#8217;ll do: Docker Swarm Cluster using Consul Create a three-node Docker Swarm cluster using Docker Machine: Provision a Swarm\u00a0cluster with Docker Machine\u00a0provide more details about why and [&hellip;]<\/p>\n","protected":false},"author":58,"featured_media":18,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[54],"tags":[],"ppma_author":[126],"class_list":["post-665","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-couchbase-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.6 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Couchbase Cluster using full armor of Docker swarm<\/title>\n<meta name=\"description\" content=\"The blog explains how to create and scale a Couchbase Cluster using full armor of Docker \u2013 Docker Machine, Docker Swarm and Docker Compose.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/pt\/couchbase-cluster-docker-swarm-compose-machine\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Couchbase Cluster on Docker Swarm using Docker Compose and Docker Machine\" \/>\n<meta property=\"og:description\" content=\"The blog explains how to create and scale a Couchbase Cluster using full armor of Docker \u2013 Docker Machine, Docker Swarm and Docker Compose.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/pt\/couchbase-cluster-docker-swarm-compose-machine\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-01-04T00:29:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Arun Gupta, VP, Developer Advocacy, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@arungupta\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Arun Gupta, VP, Developer Advocacy, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-cluster-docker-swarm-compose-machine\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-cluster-docker-swarm-compose-machine\\\/\"},\"author\":{\"name\":\"Arun Gupta, VP, Developer Advocacy, Couchbase\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/39d8caed0f536489b6aa6e8d31ee631f\"},\"headline\":\"Couchbase Cluster on Docker Swarm using Docker Compose and Docker Machine\",\"datePublished\":\"2017-01-04T00:29:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-cluster-docker-swarm-compose-machine\\\/\"},\"wordCount\":1175,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-cluster-docker-swarm-compose-machine\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"articleSection\":[\"Couchbase Server\"],\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-cluster-docker-swarm-compose-machine\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-cluster-docker-swarm-compose-machine\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-cluster-docker-swarm-compose-machine\\\/\",\"name\":\"Couchbase Cluster using full armor of Docker swarm\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-cluster-docker-swarm-compose-machine\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-cluster-docker-swarm-compose-machine\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2017-01-04T00:29:46+00:00\",\"description\":\"The blog explains how to create and scale a Couchbase Cluster using full armor of Docker \u2013 Docker Machine, Docker Swarm and Docker Compose.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-cluster-docker-swarm-compose-machine\\\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-cluster-docker-swarm-compose-machine\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-cluster-docker-swarm-compose-machine\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/couchbase-cluster-docker-swarm-compose-machine\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Couchbase Cluster on Docker Swarm using Docker Compose and Docker Machine\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-BR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"width\":\"1024\",\"height\":\"1024\",\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/39d8caed0f536489b6aa6e8d31ee631f\",\"name\":\"Arun Gupta, VP, Developer Advocacy, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f912e10b5f39748ee4f1a0b0da6f42747f0b3a94fe7acb511791468656f5e726?s=96&d=mm&r=g8900a75409c646948fe0bd80f6240337\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f912e10b5f39748ee4f1a0b0da6f42747f0b3a94fe7acb511791468656f5e726?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f912e10b5f39748ee4f1a0b0da6f42747f0b3a94fe7acb511791468656f5e726?s=96&d=mm&r=g\",\"caption\":\"Arun Gupta, VP, Developer Advocacy, Couchbase\"},\"description\":\"Arun Gupta is the vice president of developer advocacy at Couchbase. He has built and led developer communities for 10+ years at Sun, Oracle, and Red Hat. He has deep expertise in leading cross-functional teams to develop and execute strategy, planning and execution of content, marketing campaigns, and programs. Prior to that he led engineering teams at Sun and is a founding member of the Java EE team. Gupta has authored more than 2,000 blog posts on technology. He has extensive speaking experience in more than 40 countries on myriad topics and is a JavaOne Rock Star for three years in a row. Gupta also founded the Devoxx4Kids chapter in the US and continues to promote technology education among children. An author of several books on technology, an avid runner, a globe trotter, a Java Champion, a JUG leader, NetBeans Dream Team member, and a Docker Captain, he is easily accessible at @arungupta.\",\"sameAs\":[\"https:\\\/\\\/x.com\\\/arungupta\"],\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/pt\\\/author\\\/arun-gupta\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Couchbase Cluster using full armor of Docker swarm","description":"The blog explains how to create and scale a Couchbase Cluster using full armor of Docker \u2013 Docker Machine, Docker Swarm and Docker Compose.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/pt\/couchbase-cluster-docker-swarm-compose-machine\/","og_locale":"pt_BR","og_type":"article","og_title":"Couchbase Cluster on Docker Swarm using Docker Compose and Docker Machine","og_description":"The blog explains how to create and scale a Couchbase Cluster using full armor of Docker \u2013 Docker Machine, Docker Swarm and Docker Compose.","og_url":"https:\/\/www.couchbase.com\/blog\/pt\/couchbase-cluster-docker-swarm-compose-machine\/","og_site_name":"The Couchbase Blog","article_published_time":"2017-01-04T00:29:46+00:00","og_image":[{"width":1800,"height":630,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","type":"image\/png"}],"author":"Arun Gupta, VP, Developer Advocacy, Couchbase","twitter_card":"summary_large_image","twitter_creator":"@arungupta","twitter_misc":{"Written by":"Arun Gupta, VP, Developer Advocacy, Couchbase","Est. reading time":"6 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-cluster-docker-swarm-compose-machine\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-cluster-docker-swarm-compose-machine\/"},"author":{"name":"Arun Gupta, VP, Developer Advocacy, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/39d8caed0f536489b6aa6e8d31ee631f"},"headline":"Couchbase Cluster on Docker Swarm using Docker Compose and Docker Machine","datePublished":"2017-01-04T00:29:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-cluster-docker-swarm-compose-machine\/"},"wordCount":1175,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-cluster-docker-swarm-compose-machine\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","articleSection":["Couchbase Server"],"inLanguage":"pt-BR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/couchbase-cluster-docker-swarm-compose-machine\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-cluster-docker-swarm-compose-machine\/","url":"https:\/\/www.couchbase.com\/blog\/couchbase-cluster-docker-swarm-compose-machine\/","name":"Couchbase Cluster using full armor of Docker swarm","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-cluster-docker-swarm-compose-machine\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-cluster-docker-swarm-compose-machine\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","datePublished":"2017-01-04T00:29:46+00:00","description":"The blog explains how to create and scale a Couchbase Cluster using full armor of Docker \u2013 Docker Machine, Docker Swarm and Docker Compose.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-cluster-docker-swarm-compose-machine\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/couchbase-cluster-docker-swarm-compose-machine\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-cluster-docker-swarm-compose-machine\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-cluster-docker-swarm-compose-machine\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Couchbase Cluster on Docker Swarm using Docker Compose and Docker Machine"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-BR"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","width":"1024","height":"1024","caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/39d8caed0f536489b6aa6e8d31ee631f","name":"Arun Gupta, VP, Developer Advocacy, Couchbase","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/secure.gravatar.com\/avatar\/f912e10b5f39748ee4f1a0b0da6f42747f0b3a94fe7acb511791468656f5e726?s=96&d=mm&r=g8900a75409c646948fe0bd80f6240337","url":"https:\/\/secure.gravatar.com\/avatar\/f912e10b5f39748ee4f1a0b0da6f42747f0b3a94fe7acb511791468656f5e726?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f912e10b5f39748ee4f1a0b0da6f42747f0b3a94fe7acb511791468656f5e726?s=96&d=mm&r=g","caption":"Arun Gupta, VP, Developer Advocacy, Couchbase"},"description":"Arun Gupta is the vice president of developer advocacy at Couchbase. He has built and led developer communities for 10+ years at Sun, Oracle, and Red Hat. He has deep expertise in leading cross-functional teams to develop and execute strategy, planning and execution of content, marketing campaigns, and programs. Prior to that he led engineering teams at Sun and is a founding member of the Java EE team. Gupta has authored more than 2,000 blog posts on technology. He has extensive speaking experience in more than 40 countries on myriad topics and is a JavaOne Rock Star for three years in a row. Gupta also founded the Devoxx4Kids chapter in the US and continues to promote technology education among children. An author of several books on technology, an avid runner, a globe trotter, a Java Champion, a JUG leader, NetBeans Dream Team member, and a Docker Captain, he is easily accessible at @arungupta.","sameAs":["https:\/\/x.com\/arungupta"],"url":"https:\/\/www.couchbase.com\/blog\/pt\/author\/arun-gupta\/"}]}},"acf":[],"authors":[{"term_id":126,"user_id":58,"is_guest":0,"slug":"arun-gupta","display_name":"Arun Gupta, VP, Developer Advocacy, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts\/665","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/users\/58"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/comments?post=665"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/posts\/665\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/media\/18"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/media?parent=665"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/categories?post=665"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/tags?post=665"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/pt\/wp-json\/wp\/v2\/ppma_author?post=665"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}