{"id":2558,"date":"2017-02-13T17:41:17","date_gmt":"2017-02-14T01:41:17","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=2558"},"modified":"2023-07-11T16:23:40","modified_gmt":"2023-07-11T23:23:40","slug":"couchbase-using-docker-compose","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/","title":{"rendered":"Start Couchbase Using Docker Compose"},"content":{"rendered":"<p>Couchbase Forums\u00a0has a question <a href=\"https:\/\/www.couchbase.com\/forums\/t\/cant-use-n1ql-on-docker-compose\/11731\/\">Can&#8217;t use N1QL on\u00a0docker-compose<\/a>. This blog will show how to run Couchbase using Docker Compose and run a <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/getting-started\/first-n1ql-query.html\">N1QL query<\/a>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2559\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/02\/docker-compose-300x295.png\" alt=\"Docker Compose\" width=\"300\" height=\"295\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/docker-compose-300x295.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/docker-compose-65x65.png 65w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/docker-compose-50x50.png 50w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/docker-compose-20x20.png 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/docker-compose.png 700w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2560\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/02\/n1ql-300x300.png\" alt=\"N1QL\" width=\"300\" height=\"300\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/n1ql-300x300.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/n1ql-150x150.png 150w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/n1ql-65x65.png 65w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/n1ql-50x50.png 50w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/n1ql-20x20.png 20w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/n1ql.png 512w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<h2>What is Docker Compose?<\/h2>\n<p>Docker Compose allows you to define your multi-container application with all of its dependencies in a single file, then spin your application up in a single command.<\/p>\n<p>Docker Compose introduced <a href=\"https:\/\/www.couchbase.com\/blog\/deploy-docker-compose-services-swarm\/\">v3 in Docker 1.13<\/a>. How do you know what version of Docker are you running?<\/p>\n<p><code>docker version<\/code>\u00a0command gives you that information:<\/p>\n<pre class=\"lang:default decode:true \">Client:\r\n Version:      1.13.1\r\n API version:  1.26\r\n Go version:   go1.7.5\r\n Git commit:   092cba3\r\n Built:        Wed Feb  8 08:47:51 2017\r\n OS\/Arch:      darwin\/amd64\r\n\r\nServer:\r\n Version:      1.13.1\r\n API version:  1.26 (minimum version 1.12)\r\n Go version:   go1.7.5\r\n Git commit:   092cba3\r\n Built:        Wed Feb  8 08:47:51 2017\r\n OS\/Arch:      linux\/amd64\r\n Experimental: true<\/pre>\n<h2>Couchbase Docker Compose File<\/h2>\n<p>Now if you see this version of Docker, then you can use the following\u00a0Compose file:<\/p>\n<pre class=\"lang:default decode:true\">version: \"3\"\r\nservices:\r\n  db:\r\n    image: arungupta\/couchbase\r\n    deploy:\r\n      replicas: 1\r\n    ports:\r\n      - 8091:8091\r\n      - 8092:8092\r\n      - 8093:8093\r\n      - 8094:8094\r\n      - 11210:11210<\/pre>\n<p>In this Compose file:<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.docker.com\/compose\/compose-file\/#\/versioning\">v3\u00a0version of Compose file<\/a>. If you are using an older version of Docker, then you can consider using <a href=\"https:\/\/github.com\/arun-gupta\/docker-images\/blob\/master\/couchbase\/docker-compose-v2.yml\">v2 version of Compose file<\/a>.<\/li>\n<li><code>arungupta\/couchbase<\/code>\u00a0Docker image is used to start Couchbase server. \u00a0This image is\u00a0created\u00a0as explained at\u00a0<a href=\"https:\/\/github.com\/arun-gupta\/docker-images\/tree\/master\/couchbase\">github.com\/arun-gupta\/docker-images\/tree\/master\/couchbase<\/a>. It uses\u00a0<a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/rest-api\/rest-endpoints-all.html\">Couchbase REST API<\/a> to pre-configure the Couchbase server.<\/li>\n<li>Ports 8091, 8092, 8093, 8094, 11210 are exposed.<\/li>\n<li>Only a single replica of Couchbase server is started.<\/li>\n<\/ul>\n<p>Couchbase can be started in a couple of ways using this Compose file.<\/p>\n<h2>Couchbase using Docker Compose on\u00a0Single Docker Host<\/h2>\n<p>If you want to start Couchbase on a single host (such as provisioned by Docker for Mac or a single Docker Machine), then use the command:<\/p>\n<pre class=\"lang:default decode:true\">docker-compose up -d<\/pre>\n<p>This will show the warning message but starts Couchbase server:<\/p>\n<pre class=\"lang:default decode:true\">WARNING: Some services (db) use the 'deploy' key, which will be ignored. Compose does not support deploy configuration - use `docker stack deploy` to deploy to a swarm.\r\nCreating couchbase_db_1\r\n<\/pre>\n<p>Check the status of started service using the command <code>docker-compose ps<\/code>:<\/p>\n<pre class=\"lang:default decode:true\">           Name                       Command                       State                        Ports            \r\n-----------------------------------------------------------------------------------------------------------------\r\ncouchbase_db_1               \/entrypoint.sh \/opt\/couchb   Up                           11207\/tcp,                 \r\n                             ...                                                       0.0.0.0:11210-&gt;11210\/tcp,  \r\n                                                                                       11211\/tcp, 18091\/tcp,      \r\n                                                                                       18092\/tcp, 18093\/tcp,      \r\n                                                                                       0.0.0.0:8091-&gt;8091\/tcp,    \r\n                                                                                       0.0.0.0:8092-&gt;8092\/tcp,    \r\n                                                                                       0.0.0.0:8093-&gt;8093\/tcp,    \r\n                                                                                       0.0.0.0:8094-&gt;8094\/tcp<\/pre>\n<p>All the exposed ports are shown and Couchbase is accessible at https:\/\/localhost:8091. Use the credentials\u00a0Administrator\/password to access the web console.<\/p>\n<p>Now you can create buckets and connect from CBQ and run N1QL queries. For example:<\/p>\n<pre class=\"lang:default decode:true\">\/Users\/arungupta\/tools\/couchbase\/Couchbase\\ Server\\ 4.5\\ EE.app\/Contents\/Resources\/couchbase-core\/bin\/cbq -u Administrator -p password --engine https:\/\/localhost:8093\r\n Connected to : https:\/\/localhost:8093\/. Type Ctrl-D or \\QUIT to exit.\r\n\r\n Path to history file for the shell : \/Users\/arungupta\/.cbq_history \r\ncbq&gt; select now_str();\r\n{\r\n    \"requestID\": \"d28280ab-49a4-4254-9f00-06bd1d2b4695\",\r\n    \"signature\": {\r\n        \"$1\": \"string\"\r\n    },\r\n    \"results\": [\r\n        {\r\n            \"$1\": \"2017-02-13T21:36:57.248Z\"\r\n        }\r\n    ],\r\n    \"status\": \"success\",\r\n    \"metrics\": {\r\n        \"elapsedTime\": \"2.916653ms\",\r\n        \"executionTime\": \"2.829056ms\",\r\n        \"resultCount\": 1,\r\n        \"resultSize\": 56\r\n    }\r\n}\r\ncbq&gt; select version();\r\n{\r\n    \"requestID\": \"51091fa6-dcc5-40f6-9c2b-1eb6732630bb\",\r\n    \"signature\": {\r\n        \"$1\": \"string\"\r\n    },\r\n    \"results\": [\r\n        {\r\n            \"$1\": \"1.6.0\"\r\n        }\r\n    ],\r\n    \"status\": \"success\",\r\n    \"metrics\": {\r\n        \"elapsedTime\": \"4.599365ms\",\r\n        \"executionTime\": \"4.525552ms\",\r\n        \"resultCount\": 1,\r\n        \"resultSize\": 37\r\n    }\r\n}<\/pre>\n<p>Typically, you may be able to scale the services started by Docker Compose using <code>docker-compose scale<\/code> command. But\u00a0this will not be possible in our case as the ports are exposed. Scaling a service will cause port conflict.<\/p>\n<p>The container can be brought down using the command <code>docker-compose down<\/code>.<\/p>\n<h2>Couchbase using Docker Compose on Multi-host Swarm-mode Cluster<\/h2>\n<p>Docker allows multiple hosts to be configured in a cluster using Swarm-mode. This can be configured using the command <code>docker swarm init<\/code>.<\/p>\n<p>Once the cluster is initialized, then the Compose file can be used to start the cluster:<\/p>\n<pre class=\"lang:default decode:true \">docker deploy --compose-file=docker-compose.yml couchbase<\/pre>\n<p>It shows the output:<\/p>\n<pre class=\"lang:default decode:true\">Creating network couchbase_default\r\nCreating service couchbase_db<\/pre>\n<p>This creates a Docker service and the status can be seen\u00a0using the command <code>docker service ls<\/code>:<\/p>\n<pre class=\"lang:default decode:true\">ID            NAME          MODE        REPLICAS  IMAGE\r\n0zls1k4mgrry  couchbase_db  replicated  1\/1       arungupta\/couchbase:latest<\/pre>\n<p>Check the\u00a0tasks\/containers running inside the service using the command <code>docker service ps couchbase_db<\/code>:<\/p>\n<pre class=\"lang:default decode:true \">ID            NAME            IMAGE                       NODE  DESIRED STATE  CURRENT STATE        ERROR  PORTS\r\nvf5zicu4mhei  couchbase_db.1  arungupta\/couchbase:latest  moby  Running        Running 3 hours ago<\/pre>\n<p>Here again, you can connect to the Couchbase server and run N1QL queries:<\/p>\n<pre class=\"lang:default decode:true \">\/Users\/arungupta\/tools\/couchbase\/Couchbase\\ Server\\ 4.5\\ EE.app\/Contents\/Resources\/couchbase-core\/bin\/cbq -u Administrator -p password --engine https:\/\/localhost:8093\r\n Connected to : https:\/\/localhost:8093\/. Type Ctrl-D or \\QUIT to exit.\r\n\r\n Path to history file for the shell : \/Users\/arungupta\/.cbq_history \r\ncbq&gt; select version();\r\n{\r\n    \"requestID\": \"12c5581e-44ee-4ea7-9017-6a017bb60a58\",\r\n    \"signature\": {\r\n        \"$1\": \"string\"\r\n    },\r\n    \"results\": [\r\n        {\r\n            \"$1\": \"1.6.0\"\r\n        }\r\n    ],\r\n    \"status\": \"success\",\r\n    \"metrics\": {\r\n        \"elapsedTime\": \"3.725498ms\",\r\n        \"executionTime\": \"3.678153ms\",\r\n        \"resultCount\": 1,\r\n        \"resultSize\": 37\r\n    }\r\n}\r\ncbq&gt; select now_str();\r\n{\r\n    \"requestID\": \"efe034fa-6d00-4327-9fc9-da8f6d15d95c\",\r\n    \"signature\": {\r\n        \"$1\": \"string\"\r\n    },\r\n    \"results\": [\r\n        {\r\n            \"$1\": \"2017-02-13T21:38:33.502Z\"\r\n        }\r\n    ],\r\n    \"status\": \"success\",\r\n    \"metrics\": {\r\n        \"elapsedTime\": \"853.491\u00b5s\",\r\n        \"executionTime\": \"800.154\u00b5s\",\r\n        \"resultCount\": 1,\r\n        \"resultSize\": 56\r\n    }\r\n}<\/pre>\n<p>The\u00a0service, and thus the container running in the service, can be terminated using the command <code>docker service couchbase_db<\/code>.<\/p>\n<p>Any more questions? Catch us on\u00a0<a href=\"https:\/\/www.couchbase.com\/forums\/\">Couchbase Forums<\/a>.<\/p>\n<p>You may also consider running <a href=\"https:\/\/www.couchbase.com\/blog\/couchbase-cluster-docker\/\">Couchbase Cluster using Docker<\/a>\u00a0or read more about <a href=\"https:\/\/www.couchbase.com\/blog\/deploy-docker-compose-services-swarm\/\">Deploying Docker Services to Swarm<\/a>.<\/p>\n<p>Want to learn more about running Couchbase in containers?<\/p>\n<ul>\n<li><a href=\"https:\/\/couchbase.com\/containers\/\">Couchbase on Containers<\/a><\/li>\n<li><a href=\"https:\/\/developer.couchbase.com\/\">Couchbase Developer Portal<\/a><\/li>\n<li><a href=\"https:\/\/twitter.com\/couchbasedev\">@couchhasedev<\/a> and <a href=\"https:\/\/twitter.com\/couchbase\">@couchbase<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Couchbase Forums\u00a0has a question Can&#8217;t use N1QL on\u00a0docker-compose. This blog will show how to run Couchbase using Docker Compose and run a N1QL query. What is Docker Compose? Docker Compose allows you to define your multi-container application with all of [&hellip;]<\/p>\n","protected":false},"author":58,"featured_media":2559,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1816],"tags":[1520,1519],"ppma_author":[8933],"class_list":["post-2558","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-couchbase-server","tag-containers","tag-docker"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.8 (Yoast SEO v25.8) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Couchbase using Docker Compose on Single Docker Host<\/title>\n<meta name=\"description\" content=\"Can\u2019t use N1QL on docker-compose? This blog will provide a detailed explanation of how to run Couchbase using Docker Compose and run a N1QL query.\" \/>\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\/couchbase-using-docker-compose\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Start Couchbase Using Docker Compose\" \/>\n<meta property=\"og:description\" content=\"Can\u2019t use N1QL on docker-compose? This blog will provide a detailed explanation of how to run Couchbase using Docker Compose and run a N1QL query.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-02-14T01:41:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-11T23:23:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/02\/docker-compose.png\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"689\" \/>\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=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/\"},\"author\":{\"name\":\"Arun Gupta, VP, Developer Advocacy, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/39d8caed0f536489b6aa6e8d31ee631f\"},\"headline\":\"Start Couchbase Using Docker Compose\",\"datePublished\":\"2017-02-14T01:41:17+00:00\",\"dateModified\":\"2023-07-11T23:23:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/\"},\"wordCount\":475,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/docker-compose.png\",\"keywords\":[\"containers\",\"docker\"],\"articleSection\":[\"Couchbase Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/\",\"name\":\"Couchbase using Docker Compose on Single Docker Host\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/docker-compose.png\",\"datePublished\":\"2017-02-14T01:41:17+00:00\",\"dateModified\":\"2023-07-11T23:23:40+00:00\",\"description\":\"Can\u2019t use N1QL on docker-compose? This blog will provide a detailed explanation of how to run Couchbase using Docker Compose and run a N1QL query.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/docker-compose.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/docker-compose.png\",\"width\":700,\"height\":689,\"caption\":\"Docker Compose\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Start Couchbase Using Docker Compose\"}]},{\"@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\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"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\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/8900a75409c646948fe0bd80f6240337\",\"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\/author\/arun-gupta\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Couchbase using Docker Compose on Single Docker Host","description":"Can\u2019t use N1QL on docker-compose? This blog will provide a detailed explanation of how to run Couchbase using Docker Compose and run a N1QL query.","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\/couchbase-using-docker-compose\/","og_locale":"en_US","og_type":"article","og_title":"Start Couchbase Using Docker Compose","og_description":"Can\u2019t use N1QL on docker-compose? This blog will provide a detailed explanation of how to run Couchbase using Docker Compose and run a N1QL query.","og_url":"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/","og_site_name":"The Couchbase Blog","article_published_time":"2017-02-14T01:41:17+00:00","article_modified_time":"2023-07-11T23:23:40+00:00","og_image":[{"width":700,"height":689,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/02\/docker-compose.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":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/"},"author":{"name":"Arun Gupta, VP, Developer Advocacy, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/39d8caed0f536489b6aa6e8d31ee631f"},"headline":"Start Couchbase Using Docker Compose","datePublished":"2017-02-14T01:41:17+00:00","dateModified":"2023-07-11T23:23:40+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/"},"wordCount":475,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/docker-compose.png","keywords":["containers","docker"],"articleSection":["Couchbase Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/","url":"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/","name":"Couchbase using Docker Compose on Single Docker Host","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/docker-compose.png","datePublished":"2017-02-14T01:41:17+00:00","dateModified":"2023-07-11T23:23:40+00:00","description":"Can\u2019t use N1QL on docker-compose? This blog will provide a detailed explanation of how to run Couchbase using Docker Compose and run a N1QL query.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/docker-compose.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/02\/docker-compose.png","width":700,"height":689,"caption":"Docker Compose"},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-using-docker-compose\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Start Couchbase Using Docker Compose"}]},{"@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":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"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":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/8900a75409c646948fe0bd80f6240337","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\/author\/arun-gupta\/"}]}},"authors":[{"term_id":8933,"user_id":58,"is_guest":0,"slug":"arun-gupta","display_name":"Arun Gupta, VP, Developer Advocacy, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/f912e10b5f39748ee4f1a0b0da6f42747f0b3a94fe7acb511791468656f5e726?s=96&d=mm&r=g","author_category":"","last_name":"Gupta","first_name":"Arun","job_title":"","user_url":"","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.\r\n\r\nGupta 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."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2558","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/58"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=2558"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2558\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/2559"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=2558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=2558"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=2558"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=2558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}