{"id":2331,"date":"2017-01-06T06:22:13","date_gmt":"2017-01-06T06:22:13","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=2331"},"modified":"2023-06-21T06:18:04","modified_gmt":"2023-06-21T13:18:04","slug":"couchbase-docker-container-amazon-ecs","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/","title":{"rendered":"Couchbase Docker Container on Amazon ECS"},"content":{"rendered":"<p>This blog will explain how to run a Couchbase Docker container using\u00a0<a href=\"https:\/\/aws.amazon.com\/ecs\/\">Amazon EC2 Container Service<\/a> (Amazon ECS).<\/p>\n<p>Many thanks to <a href=\"https:\/\/twitter.com\/moviolone\">@moviolone<\/a> for helping understand the concepts and getting this setup running.<\/p>\n<h2>What is Amazon ECS?<\/h2>\n<p>Amazon ECS is a container management service that makes it easy to run, stop, and manage Docker containers on a cluster of Amazon EC2 instances.\u00a0Amazon ECS integrates well with rest of the AWS infrastructure and\u00a0eliminates the need to operate<br \/>\nyour own cluster or configuration management systems.<br \/>\n<a href=\"https:\/\/aws.amazon.com\/ecs\/\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-14114\" src=\"\/wp-content\/original-assets\/july2015\/couchbase-docker-container-on-amazon-ecs\/ec2-container-service.png\" alt=\"ec2-container-service\" width=\"834\" height=\"275\" \/><\/a><\/p>\n<p>One obvious\u00a0question to wonder is how is this different from other container orchestration frameworks like <a href=\"https:\/\/docs.docker.com\/swarm\/\">Docker Swarm<\/a>, <a href=\"https:\/\/kubernetes.io\/\">Kubernetes<\/a>, or <a href=\"https:\/\/mesos.apache.org\/\">Mesos<\/a>.<br \/>\nThe first big difference is that each of these frameworks are open source. Amazon uses a proprietary orchestration framework at this time. A\u00a0big advantage of ECS is that just\u00a0like rest of the AWS infrastructure, this is a <strong>managed service<\/strong>.<br \/>\nAnd so you only need to worry about deploying your containers without worrying about the infrastructure.<\/p>\n<p>A better comparison of ECS is\u00a0with <a href=\"https:\/\/beta.docker.com\/docs\/\">Docker for AWS\/Azure<\/a> (backed by newly introduced <a href=\"https:\/\/docs.docker.com\/engine\/swarm\/\">Swarm Mode in Docker<\/a>), <a href=\"https:\/\/cloud.google.com\/container-engine\/\">Google Container Engine<\/a> (backed by Kubernetes), <a href=\"https:\/\/dcos.io\/\">DC\/OS<\/a> (backed by Mesos) as they are managed services as well. An advantage point of ECS is that it <strong>seamlessly integrates with AWS infrastructure<\/strong> such as deploying container instances<br \/>\nusing <a href=\"https:\/\/aws.amazon.com\/cloudformation\/\">CloudFormation<\/a> templates, scaling containers using <a href=\"https:\/\/aws.amazon.com\/autoscaling\/\">Autoscaling Group<\/a>, port mapping using <a href=\"https:\/\/docs.aws.amazon.com\/AWSEC2\/latest\/UserGuide\/using-network-security.html\">Security Groups<\/a>,<br \/>\nmanage incoming container traffic using <a href=\"https:\/\/aws.amazon.com\/elasticloadbalancing\/\">Elastic Load Balancer<\/a>, viewing logs using\u00a0<a href=\"https:\/\/aws.amazon.com\/cloudwatch\/\">CloudWatch<\/a> and others. If you are already bought in<br \/>\nthe Amazon infrastructure, then ECS sounds like a good fit.<\/p>\n<p><a href=\"https:\/\/www.couchbase.com\/blog\/docker-for-aws-getting-started-scaling-nodes\/\">Docker for AWS<\/a>, announced at DockerCon, is also a\u00a0similar offering in this space.<\/p>\n<p>However, there are a couple of cons\u00a0that you need to be aware of as well:<\/p>\n<ul>\n<li><strong>Portability<\/strong> &#8211; Application designed <a href=\"https:\/\/www.couchbase.com\/blog\/deploy-docker-compose-services-swarm\/\">Docker Swarm<\/a>, Kubernetes and Mesos can run on a variety of platforms, such as Amazon, Azure, GCE, OpenStack, on-prem, VMWare, bare metal data centers, etc. But ECS is tied to Amazon only. Do you<br \/>\nconsider that as a vendor lock-in? Amazon may release their\u00a0orchestration platform or scheduler as a standalone product, but that&#8217;s not very typical.<\/li>\n<li><strong>Container format<\/strong> &#8211; ECS service is focused on Docker containers only. For all practical purposes, at least today, this may be perfectly fine. I&#8217;ve not heard or seen any deployments of <a href=\"https:\/\/coreos.com\/rkt\/docs\/latest\/\">Rkt<\/a>\u00a0or<br \/>\nany other container formats.\u00a0However, this may change once <a href=\"https:\/\/www.opencontainers.org\/\">OCI<\/a>-compliant runtimes start showing up in the future.<\/li>\n<\/ul>\n<p>One last thing, before we dig in the concepts and code, there is no additional charge for Amazon EC2 Container Service. You pay for AWS resources (e.g. EC2 instances or EBS volumes) you create to store and run your application.<\/p>\n<h2>Amazon ECS Concepts<\/h2>\n<p>Here is an\u00a0overview of the key concepts in ECS:<br \/>\n<a href=\"\/wp-content\/original-assets\/july2015\/couchbase-docker-container-on-amazon-ecs\/amazon-ecs-concepts-1024x540.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-14134\" src=\"\/wp-content\/original-assets\/july2015\/couchbase-docker-container-on-amazon-ecs\/amazon-ecs-concepts-1024x540.png\" alt=\"amazon-ecs-concepts\" width=\"604\" height=\"319\" \/><\/a><\/p>\n<ul>\n<li><strong><a href=\"https:\/\/docs.aws.amazon.com\/AmazonECS\/latest\/developerguide\/ECS_instances.html\">Container Instance<\/a><\/strong>:\u00a0An AMI instance that is primed for running containers.\u00a0By default, each Amazon instance uses\u00a0<a href=\"https:\/\/docs.aws.amazon.com\/AmazonECS\/latest\/developerguide\/ecs-optimized_AMI.html\">Amazon ECS-Optimized Linux AMI<\/a>.<br \/>\nThis is the recommended image to run ECS container service.\u00a0The key components of this base image are:<\/p>\n<ul>\n<li>Amazon Linux AMI<\/li>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/AmazonECS\/latest\/developerguide\/ECS_agent.html\">Amazon ECS Container Agent<\/a> &#8211; It manages\u00a0containers lifecycle on behalf of ECS and allows them to connect to the cluster.<\/li>\n<li>Docker Engine (as of this writing, this is version\u00a01.11.1)<\/li>\n<\/ul>\n<p>Other images like CoreOS, Suse or Ubuntu can be configured to meet <a href=\"https:\/\/docs.aws.amazon.com\/AmazonECS\/latest\/developerguide\/container_instance_AMIs.html\">Container Instance AMI<\/a> specification.\u00a0This can be done because <a href=\"https:\/\/github.com\/aws\/amazon-ecs-agent\">ECS Agent code<\/a> is available in open source.<\/li>\n<li><strong>Task<\/strong>: A task is defined as a JSON file and describes an application that contains one or more container\u00a0definitions. This usually points to\u00a0Docker images\u00a0from a registry, port\/volume mapping, etc.<\/li>\n<li><strong>Service<\/strong>:\u00a0ECS\u00a0maintains the &#8220;desired state&#8221; of your application. This is achieved by creating a <a href=\"https:\/\/docs.aws.amazon.com\/AmazonECS\/latest\/developerguide\/ecs_services.html\">service<\/a>. A service\u00a0specifies<br \/>\nthe number of instances of a task definition that needs to run at a given time. If the task in a service becomes unhealthy or stop running, then the service scheduler will bounce the task.\u00a0It ensures that\u00a0the desired and actual state<br \/>\nare match. This is what provides resilience in ECS.New tasks\u00a0within a Service are balanced across Availability Zones in your cluster. Service scheduler figures out which container instances can meet the needs of a service and schedules it<br \/>\non a valid container instance in an optimal Availability Zone (one with the fewest number of tasks running).<\/li>\n<\/ul>\n<h2>Getting Started with Amazon EC2 Container Service<\/h2>\n<p>Login to your <a href=\"https:\/\/console.aws.amazon.com\/console\/home\">AWS EC2 console<\/a> and click on the <a href=\"https:\/\/console.aws.amazon.com\/ecs\/home\">EC2 Container Service<\/a>:<br \/>\n<a href=\"\/wp-content\/original-assets\/july2015\/couchbase-docker-container-on-amazon-ecs\/aws-ec2-container-1-1024x616.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-14118\" src=\"\/wp-content\/original-assets\/july2015\/couchbase-docker-container-on-amazon-ecs\/aws-ec2-container-1-1024x616.png\" alt=\"aws-ec2-container-1\" width=\"604\" height=\"363\" \/><\/a><\/p>\n<p>Click on the <code>Get started<\/code> button to\u00a0define your application.<\/p>\n<h2>Create ECS Task<\/h2>\n<p>In ECS, Docker workloads are defined as tasks. A task can contain multiple containers. All containers for a task are co-located on the same machine. Enter the values as shown:<br \/>\n<a href=\"\/wp-content\/original-assets\/july2015\/couchbase-docker-container-on-amazon-ecs\/aws-ec2-container-2-1024x795.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-14119\" src=\"\/wp-content\/original-assets\/july2015\/couchbase-docker-container-on-amazon-ecs\/aws-ec2-container-2-1024x795.png\" alt=\"aws-ec2-container-2\" width=\"604\" height=\"469\" \/><\/a><br \/>\nFew items<br \/>\nspecified in this step:<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/AmazonECS\/latest\/developerguide\/task_defintions.html\">Task definition<\/a> is description of an application that contains one or more container definitions.<\/li>\n<li>Container name is the name that will be given to the\u00a0container started as part of this task.<\/li>\n<li>Image allows to specify one or more images that need to be started as containers as part of this application. The image specified here uses <a href=\"https:\/\/hub.docker.com\/_\/couchbase\/\">couchbase:latest<\/a> as the base image and uses <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/rest-api\/rest-endpoints-all.html\">Couchbase REST API<\/a>\u00a0to<br \/>\nconfigure the server. <a href=\"https:\/\/github.com\/arun-gupta\/docker-images\/blob\/master\/couchbase\/Dockerfile\">Dockerfile<\/a>\u00a0for this image provide more details about how this image is prepared.<\/li>\n<li>Maximum memory is the memory that needs to be allocated for the container (equivalent to <code>-m<\/code> Docker CLI switch). Couchbase needs 1GB\u00a0for running in dev and so that is specified here.<\/li>\n<li>And finally the port mappings (<code>-p<\/code> on Docker CLI). Port 8091 is needed for Couchbase administration.<\/li>\n<\/ul>\n<p>More details about these is available in <a href=\"https:\/\/docs.aws.amazon.com\/AmazonECS\/latest\/developerguide\/task_definition_parameters.html\">Task Definition Parameters<\/a>.<\/p>\n<h2>Create ECS Service<\/h2>\n<p>Click on <code>Next step<\/code> to\u00a0configure a service.<br \/>\n<a href=\"\/wp-content\/original-assets\/july2015\/couchbase-docker-container-on-amazon-ecs\/aws-ec2-container-3-1024x732.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-14120\" src=\"\/wp-content\/original-assets\/july2015\/couchbase-docker-container-on-amazon-ecs\/aws-ec2-container-3-1024x732.png\" alt=\"aws-ec2-container-3\" width=\"604\" height=\"432\" \/><\/a><\/p>\n<p>Give a service name.\u00a0The desired state can be specified here. For now, we&#8217;ll keep it simple and launch a single node Couchbase container. And since the desired state is run a single container,\u00a0no ELB is required. More details about these is\u00a0available<br \/>\nin <a href=\"https:\/\/docs.aws.amazon.com\/AmazonECS\/latest\/developerguide\/service_definition_paramters.html\">Service Definition Parameters<\/a>.<\/p>\n<h2>Create ECS Cluster<\/h2>\n<p>Tasks run on a container instance, and these instances need to register in a cluster. This allows us to scale the cluster up\/down later to accommodate for running more containers. Click on <code>Next step<\/code> to configure the cluster.<\/p>\n<p><a href=\"\/wp-content\/original-assets\/july2015\/couchbase-docker-container-on-amazon-ecs\/aws-ec2-container-4-1024x811.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-14121\" src=\"\/wp-content\/original-assets\/july2015\/couchbase-docker-container-on-amazon-ecs\/aws-ec2-container-4-1024x811.png\" alt=\"aws-ec2-container-4\" width=\"604\" height=\"478\" \/><\/a><\/p>\n<p>In this image:<\/p>\n<ul>\n<li>Take the default cluster name<\/li>\n<li>A homogenous cluster\u00a0of container instances is created. <a href=\"https:\/\/aws.amazon.com\/ec2\/instance-types\/\">m3.medium<\/a> is a good size to run Couchbase node during early development phase. A <code>c3.xlarge<\/code> or a larger image should<br \/>\nbe used for production. Make sure to read through <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/install\/pre-install.html\">Couchbase requirements<\/a> for minimum and recommended hardware and software requirements.<\/li>\n<li>Choose a previously created security key. This will allow to open a ssh connection to the container instance<\/li>\n<li>A new IAM role will be created to allow ECS agent to\u00a0communicate with ECS service<\/li>\n<\/ul>\n<p>Container instances in a cluster can span multiple availability zones and be balanced with ELB. Review all the specified options:<br \/>\n<a href=\"\/wp-content\/original-assets\/july2015\/couchbase-docker-container-on-amazon-ecs\/aws-ec2-container-5-1024x797.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-14122\" src=\"\/wp-content\/original-assets\/july2015\/couchbase-docker-container-on-amazon-ecs\/aws-ec2-container-5-1024x797.png\" alt=\"aws-ec2-container-5\" width=\"604\" height=\"470\" \/><\/a><br \/>\nClick<br \/>\non <code>Launch instance &amp; run service<\/code> button to start the\u00a0service. The following status is shown after the service is created:<br \/>\n<a href=\"\/wp-content\/original-assets\/july2015\/couchbase-docker-container-on-amazon-ecs\/aws-ec2-container-6-714x1024.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-14126\" src=\"\/wp-content\/original-assets\/july2015\/couchbase-docker-container-on-amazon-ecs\/aws-ec2-container-6-714x1024.png\" alt=\"aws-ec2-container-6\" width=\"604\" height=\"866\" \/><\/a><\/p>\n<p>The output shows that the cluster, service\u00a0and\u00a0task\u00a0definitions\u00a0are created.\u00a0It takes a few minutes for the instances to be provisioned and initializedand tasks to run on them.<\/p>\n<h2>View ECS Service and Task<\/h2>\n<p>Click on <code>View Service<\/code> button to see the newly created service.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-14128\" src=\"\/wp-content\/original-assets\/july2015\/couchbase-docker-container-on-amazon-ecs\/aws-ec2-container-7-1024x750.png\" alt=\"aws-ec2-container-7\" width=\"604\" height=\"442\" \/><\/p>\n<p>Few things in this image:<\/p>\n<ul>\n<li>The service shows the task definition <code>couchbase:6<\/code>.\u00a0Each service is assigned a task definition and multiple versions are indicated by the trailing number at the end. In this case, a few versions were created earlier but otherwise<br \/>\nthe version number starts from <code>1<\/code>.<\/li>\n<li>Desired and Running count is shown as 1.<\/li>\n<li><code>Minimum healthy percent<\/code> and <code>Maximum percent<\/code>\u00a0are used if a new\u00a0version of task\u00a0definition needs to be deployed. With 100% and 200% corresponding values, a new version of the task will be\u00a0deployed first<br \/>\nand then the older versions will be terminated. We&#8217;ll play with these numbers in a subsequent blog.<\/li>\n<li>Running task is shown towards\u00a0bottom of the screen. Click on\u00a0the UUID to learn more about the running\u00a0task.<\/li>\n<\/ul>\n<p><a href=\"\/wp-content\/original-assets\/july2015\/couchbase-docker-container-on-amazon-ecs\/aws-ec2-container-8-1024x772.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-14127\" src=\"\/wp-content\/original-assets\/july2015\/couchbase-docker-container-on-amazon-ecs\/aws-ec2-container-8-1024x772.png\" alt=\"aws-ec2-container-8\" width=\"604\" height=\"455\" \/><\/a><\/p>\n<p>Task definition shows EC2 instance\u00a0where it is running, current status, port mapping and several other useful information. The critical piece that we need to look at is the <code>External Link<\/code>. This URL is where our Couchbase Web Console will<br \/>\nbe accessible.<\/p>\n<h2>Couchbase Web Console<\/h2>\n<p>Clicking on this link will open a new tab with <a href=\"https:\/\/developer.couchbase.com\/documentation\/server\/current\/admin\/ui-intro.html\">Couchbase Web Console<\/a>:<br \/>\n<a href=\"\/wp-content\/original-assets\/july2015\/couchbase-docker-container-on-amazon-ecs\/aws-ec2-container-10-1024x577.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-14129\" src=\"\/wp-content\/original-assets\/july2015\/couchbase-docker-container-on-amazon-ecs\/aws-ec2-container-10-1024x577.png\" alt=\"aws-ec2-container-10\" width=\"604\" height=\"340\" \/><\/a><\/p>\n<p>Enter the login as <code>Administrator<\/code> and password as <code>password<\/code>. These are configured in <a href=\"https:\/\/github.com\/arun-gupta\/docker-images\/blob\/master\/couchbase\/configure-node.sh#L14\">arungupta\/couchbase image<\/a>. And here you<br \/>\nsee Couchbase Web Console in full glory!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2734\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/01\/aws-ec2-container-11-1024x859.png\" alt=\" aws-ec2-container\" width=\"1024\" height=\"859\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/01\/aws-ec2-container-11-1024x859.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/01\/aws-ec2-container-11-1024x859-300x252.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/01\/aws-ec2-container-11-1024x859-768x644.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2017\/01\/aws-ec2-container-11-1024x859-20x17.png 20w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>This blog explained how to run a Couchbase Docker container using\u00a0<a href=\"https:\/\/aws.amazon.com\/ecs\/\">Amazon ECS<\/a>.<\/p>\n<p>Future blogs will show &#8230;<\/p>\n<ul>\n<li>Setup a\u00a0Couchbase cluster using ECS<\/li>\n<li>Deploy a\u00a0multi-container application using Docker Compose (<a href=\"https:\/\/aws.amazon.com\/about-aws\/whats-new\/2016\/07\/amazon-ec2-container-service-cli-supports-docker-compose-version-2-format\/\">v2 is now supported<\/a>)<\/li>\n<li>Setup ECS cluster using CLI<\/li>\n<\/ul>\n<h2>Amazon ECS and Couchbase\u00a0References<\/h2>\n<ul>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/AmazonECS\/latest\/developerguide\/Welcome.html\">EC2 Container Service Docs<\/a><\/li>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/AmazonECS\/latest\/developerguide\/ECS_GetStarted.html\">Getting Started with ECS Tutorial<\/a><\/li>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/AmazonECS\/latest\/developerguide\/application_architecture.html\">ECS Application Architecture<\/a><\/li>\n<li><a href=\"https:\/\/www.couchbase.com\/containers\/\">Couchbase on Containers<\/a><\/li>\n<li><a href=\"https:\/\/developer.couchbase.com\/server\">Couchbase Server Portal<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This blog will explain how to run a Couchbase Docker container using\u00a0Amazon EC2 Container Service (Amazon ECS). Many thanks to @moviolone for helping understand the concepts and getting this setup running. What is Amazon ECS? Amazon ECS is a container [&hellip;]<\/p>\n","protected":false},"author":58,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1816],"tags":[],"ppma_author":[8933],"class_list":["post-2331","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-couchbase-server"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.0 (Yoast SEO v26.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Couchbase Docker Container on Amazon ECS - The Couchbase Blog<\/title>\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-docker-container-amazon-ecs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Couchbase Docker Container on Amazon ECS\" \/>\n<meta property=\"og:description\" content=\"This blog will explain how to run a Couchbase Docker container using\u00a0Amazon EC2 Container Service (Amazon ECS). Many thanks to @moviolone for helping understand the concepts and getting this setup running. What is Amazon ECS? Amazon ECS is a container [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-01-06T06:22:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-21T13:18:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/01\/aws-ec2-container-11-1024x859.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=\"9 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-docker-container-amazon-ecs\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/\"},\"author\":{\"name\":\"Arun Gupta, VP, Developer Advocacy, Couchbase\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/39d8caed0f536489b6aa6e8d31ee631f\"},\"headline\":\"Couchbase Docker Container on Amazon ECS\",\"datePublished\":\"2017-01-06T06:22:13+00:00\",\"dateModified\":\"2023-06-21T13:18:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/\"},\"wordCount\":1452,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"articleSection\":[\"Couchbase Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/\",\"name\":\"Couchbase Docker Container on Amazon ECS - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2017-01-06T06:22:13+00:00\",\"dateModified\":\"2023-06-21T13:18:04+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Couchbase Docker Container on Amazon ECS\"}]},{\"@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 Docker Container on Amazon ECS - The Couchbase Blog","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-docker-container-amazon-ecs\/","og_locale":"en_US","og_type":"article","og_title":"Couchbase Docker Container on Amazon ECS","og_description":"This blog will explain how to run a Couchbase Docker container using\u00a0Amazon EC2 Container Service (Amazon ECS). Many thanks to @moviolone for helping understand the concepts and getting this setup running. What is Amazon ECS? Amazon ECS is a container [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/","og_site_name":"The Couchbase Blog","article_published_time":"2017-01-06T06:22:13+00:00","article_modified_time":"2023-06-21T13:18:04+00:00","og_image":[{"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2017\/01\/aws-ec2-container-11-1024x859.png","type":"","width":"","height":""}],"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":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/"},"author":{"name":"Arun Gupta, VP, Developer Advocacy, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/39d8caed0f536489b6aa6e8d31ee631f"},"headline":"Couchbase Docker Container on Amazon ECS","datePublished":"2017-01-06T06:22:13+00:00","dateModified":"2023-06-21T13:18:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/"},"wordCount":1452,"commentCount":5,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","articleSection":["Couchbase Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/","url":"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/","name":"Couchbase Docker Container on Amazon ECS - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2017-01-06T06:22:13+00:00","dateModified":"2023-06-21T13:18:04+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/couchbase-docker-container-amazon-ecs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Couchbase Docker Container on Amazon ECS"}]},{"@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\/2331","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=2331"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2331\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/13873"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=2331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=2331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=2331"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=2331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}