{"id":2436,"date":"2016-11-14T20:10:51","date_gmt":"2016-11-14T20:10:50","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=2436"},"modified":"2025-06-13T19:40:28","modified_gmt":"2025-06-14T02:40:28","slug":"docker-and-asp-net-core-with-couchbase-server","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/","title":{"rendered":"Docker and ASP.NET Core with Couchbase Server"},"content":{"rendered":"<div id=\"preamble\">\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>In many of my blog posts and samples, I use a single Couchbase Server node. I do this because it\u2019s easy, and much of what I demonstrate can be done with a single node. However, Couchbase Server is typically run on multiple nodes in production (sometimes 3, sometimes 3000). In order to simulate this locally, I can use some lightweight Docker containers.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>While I\u2019m at it, I\u2019m going to show you how to get started with an ASP.NET Core website, also running on Docker.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"truewhat-you-need-to-get-started\">What you need to get started<\/h2>\n<div class=\"sectionbody\">\n<div class=\"ulist\">\n<ul>\n<li><a href=\"https:\/\/www.docker.com\/products\/docker#\/windows\">Docker for Windows<\/a>. You can use Docker for any platform, but in this sample, I\u2019m using Windows.<\/li>\n<li>Visual Studio 2015 (or later). You don\u2019t need Visual Studio to use ASP.NET Core or Docker, but I\u2019m using a Visual Studio extension to make things easier.<\/li>\n<li><a href=\"https:\/\/www.microsoft.com\/net\/core#windows\">.NET Core VS 2015 tooling preview 2<\/a> or higher. This is .NET Core tooling for Visual Studio.<\/li>\n<li><a href=\"https:\/\/visualstudiogallery.msdn.microsoft.com\/0f5b2caa-ea00-41c8-b8a2-058c7da0b3e4\">Visual Studio Tools for Docker<\/a> (preview). More VS tooling to make the job easier.<\/li>\n<\/ul>\n<\/div>\n<div class=\"paragraph\">\n<p>Once you have all of the above installed, make sure to turn on drive sharing in Docker. Otherwise, you will get a error like <code>The \"PrepareForLaunch\" task failed unexpectedly<\/code> later. (I needed to enable sharing on both C and D drive, but your setup will vary).<\/p>\n<\/div>\n<div class=\"imageblock\">\n<div class=\"content\"><img decoding=\"async\" src=\"\/wp-content\/original-assets\/2016\/november\/docker-and-asp.net-core-with-couchbase-server\/001_shared_drives.png\" alt=\"Enable shared drives in Docker for Windows\" \/><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"truesetup-couchbase-server-on-docker\">Setup Couchbase Server on Docker<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>Start by running a Couchbase Docker image. Since the ASP.NET Core site will be running within Docker, we only need to expose port 8091 (to use the Couchbase Console from a web browser at localhost:8091).<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><code>docker run -d --name db -p 8091:8091 couchbase<\/code><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>I named it <code>db<\/code> but you are welcome to name it whatever you\u2019d like. I specified <code>couchbase<\/code> as the image, which is Couchbase Server 4.5.1 at the time I\u2019m writing this.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Next, run at least one more container with Couchbase. There\u2019s no need to map any ports for these. I\u2019ll just create two:<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><code>docker run -d --name db2 couchbase<\/code><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p><code>docker run -d --name db3 couchbase<\/code><\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Make note of the IP addresses of these two containers by using <code>docker inspect db<\/code> \/ <code>docker inspect db2<\/code> \/ <code>etc\u2026\u200b<\/code> and looking for <code>IPAddress<\/code> in the output.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Now, point your web browser to <code>localhost:8091<\/code> to setup the Couchbase cluster. If you\u2019ve not done this before, you can check out <a href=\"https:\/\/www.couchbase.com\/blog\/couchbase-with-windows-and-.net---part-1\/\">this blog post on setting up Couchbase Server<\/a> or you can <a href=\"https:\/\/www.couchbase.com\/blog\/how-to-install-couchbase-server-on-windows-video\/\">watch this video on stepping through Couchbase Server setup<\/a>.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>When you setup and create a bucket (I created a bucket named &#8216;default&#8217;), go ahead and enable replication, since we\u2019re going to add some more nodes.<\/p>\n<\/div>\n<div class=\"imageblock\">\n<div class=\"content\"><img decoding=\"async\" src=\"\/wp-content\/original-assets\/2016\/november\/docker-and-asp.net-core-with-couchbase-server\/002_enable_replication.png\" alt=\"Enable replication when creating a bucket\" \/><\/div>\n<div class=\"content\"><\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>Go to the Server Nodes tab and click &#8220;Add Server&#8221;. Enter the IP Address of db2 and click &#8220;Add Server&#8221;. Repeat for db3 and any other nodes you\u2019ve created. At this point, you should see a number next to &#8220;Pending Rebalance&#8221;. This means the nodes are ready to become part of the cluster.<\/p>\n<\/div>\n<div class=\"imageblock\">\n<div class=\"content\"><img decoding=\"async\" src=\"\/wp-content\/original-assets\/2016\/november\/docker-and-asp.net-core-with-couchbase-server\/003_pending_rebalance.png\" alt=\"Rebalance pending in Couchbase Console\" \/><\/div>\n<div class=\"content\"><\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>Click &#8216;rebalance&#8217;. This will take a little bit of time, but when it\u2019s done, you\u2019ll have a Couchbase Server cluster all running within Docker. It\u2019s important to note that even during the rebalancing operation, the cluster remains functional.<\/p>\n<\/div>\n<div class=\"imageblock\">\n<div class=\"content\"><img decoding=\"async\" src=\"\/wp-content\/original-assets\/2016\/november\/docker-and-asp.net-core-with-couchbase-server\/004_couchbase_cluster_in_docker.png\" alt=\"Couchbase Cluster in Docker\" \/><\/div>\n<div class=\"content\"><\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>While you\u2019re in the Couchbase Console, go ahead and create a primary index. Execute <code>CREATE PRIMARY INDEX on `default`<\/code> in the Query tab. The ASP.NET Core app will need this.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"truecreate-an-asp-net-core-app\">Create an ASP.NET Core app<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>From Visual Studio, create a new ASP.NET Core app. Or you can use the <a href=\"https:\/\/github.com\/couchbaselabs\/blog-source-code\/tree\/master\/Groves\/036DockerNetCore\/DockerNetCore\">ASP.NET Core source code I\u2019ve already prepared for this example on GitHub<\/a>. It\u2019s a very simple website with two operations: list all the gifts and add a new random(ish) gift to the list. (It\u2019s that time of year and I\u2019ve got gifts on my mind!)<\/p>\n<\/div>\n<div class=\"imageblock\">\n<div class=\"content\"><img decoding=\"async\" src=\"\/wp-content\/original-assets\/2016\/november\/docker-and-asp.net-core-with-couchbase-server\/005_new_project.png\" alt=\"New ASP.NET Core project in Visual Studio\" \/><\/div>\n<div class=\"content\"><\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>Add the CouchbaseNetClient dependency with NuGet. We\u2019ll be using the .NET Core SDK, which is currently in developer preview. Therefore, you will need to execute <code>Install-Package CouchbaseNetClient -Pre<\/code> in the Package Manager Console. If you don\u2019t use <code>-Pre<\/code>, NuGet will attempt to install the .NET SDK instead of the .NET Core SDK.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Next, add Docker support to the project. Right-click the project, then click Add, then click &#8220;Docker Support&#8221;. This will add some Docker files to your project. If you don\u2019t see this option, then you need to install <a href=\"https:\/\/visualstudiogallery.msdn.microsoft.com\/0f5b2caa-ea00-41c8-b8a2-058c7da0b3e4\">Visual Studio Tools for Docker<\/a>.<\/p>\n<\/div>\n<div class=\"imageblock\">\n<div class=\"content\"><img decoding=\"async\" src=\"\/wp-content\/original-assets\/2016\/november\/docker-and-asp.net-core-with-couchbase-server\/006_add_docker_support.png\" alt=\"Add Docker support with Visual Studio Tools for Docker\" \/><\/div>\n<div class=\"content\"><\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>In the ASP.NET Core app, setup the <code>ClusterHelper<\/code> to point to the Couchbase Cluster by using one or more of the IP addresses of the db\/db2\/db3 containers.<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlightjs highlight\"><code class=\"language-C#\">var client = new ClientConfiguration();\r\nclient.Servers = new List {new Uri(\"couchbase:\/\/172.17.0.2\")};\r\nClusterHelper.Initialize(client);<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>Check out the full source code on GitHub, especially <code>HomeController.cs<\/code> and <code>Gift.cs<\/code>. Here is the <code>Index<\/code> action and the <code>GetAllGifts<\/code> method it\u2019s calling.<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlightjs highlight\"><code class=\"language-C#\">public IActionResult Index()\r\n{\r\n    var gifts = Gift.GetAllGifts();\r\n    return View(gifts);\r\n}\r\n\r\npublic static List GetAllGifts()\r\n{\r\n    var bucket = ClusterHelper.GetBucket(\"default\");\r\n    var query = QueryRequest.Create(\"SELECT g.* FROM `default` g\");\r\n    query.ScanConsistency(ScanConsistency.RequestPlus);\r\n    return bucket.Query(query).Rows;\r\n}<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>Since you have Docker tools installed, there\u2019s a new deploy button for Docker.<\/p>\n<\/div>\n<div class=\"imageblock\">\n<div class=\"content\"><img decoding=\"async\" src=\"\/wp-content\/original-assets\/2016\/november\/docker-and-asp.net-core-with-couchbase-server\/007_docker_deploy_button.png\" alt=\"Docker deploy button in Visual Studio\" \/><\/div>\n<div class=\"content\"><\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>Click this to run your ASP.NET Core app in Docker. Note that when you first run this, it might take longer because it\u2019s downloading the <a href=\"https:\/\/hub.docker.com\/r\/microsoft\/aspnetcore\/\">aspnetcore<\/a> image from Docker Hub.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Once that container is deployed, there\u2019s one more step. For whatever reason, the aspnetcore Docker image doesn\u2019t attach to the &#8216;bridge&#8217; Docker network. Therefore, the ASP.NET Core app can\u2019t see the Couchbase cluster. To add &#8216;bridge&#8217;, run <code>docker network connect bridge dockernetcore_dockernetcore_1<\/code> (the name of your container may vary). There might be another way to do this by changing the <code>Dockerfile<\/code> or <code>docker-compose.yml<\/code>, but I don\u2019t know what it is (yet).<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Run the ASP.NET Core app again (with Docker). The website should appear in your browser. At this point, you have 4 containers running in the Docker host together: a web server running ASP.NET Core and three Couchbase Server nodes.<\/p>\n<\/div>\n<div class=\"imageblock\">\n<div class=\"content\"><img decoding=\"async\" src=\"\/wp-content\/original-assets\/2016\/november\/docker-and-asp.net-core-with-couchbase-server\/008_aspnetcore_gift_website.png\" alt=\"ASP.NET Core website using Couchbase Server\" \/><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"truesummary\">Summary<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>When your site is running, and you\u2019ve added a few gifts, go back to the Couchbase Console and open the Server Nodes tab. Take a look at the &#8220;Items&#8221; column and note the Active\/Replica split. As you add gifts, note that the documents are being automatically sharded amongst the nodes, and the replicas are being stored in the other nodes.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Something else you can try for fun: turn on auto-failover (Settings \u2192 Auto-Failover \u2192 Enable), and then shut down one of the Couchbase nodes (<code>docker stop db2<\/code> for instance). Then watch the Couchbase Console as the node goes down and the other nodes compenstate. Finally, bring the node back online (<code>docker start db2<\/code>), and notice that the cluster gives you some options for adding the node back in.<\/p>\n<\/div>\n<div class=\"imageblock\">\n<div class=\"content\"><img decoding=\"async\" src=\"\/wp-content\/original-assets\/2016\/november\/docker-and-asp.net-core-with-couchbase-server\/009_node_recovery.png\" alt=\"Options for recovering a Couchbase node\" \/><\/div>\n<div class=\"content\"><\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>I\u2019m pretty new at both Docker and ASP.NET Core, so if you have any tips or suggestions, I\u2019d love to hear them. Please leave a comment or <a href=\"https:\/\/twitter.com\/mgroves\">find @mgroves on Twitter<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In many of my blog posts and samples, I use a single Couchbase Server node. I do this because it\u2019s easy, and much of what I demonstrate can be done with a single node. However, Couchbase Server is typically run [&hellip;]<\/p>\n","protected":false},"author":71,"featured_media":13873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1811,10126,1821,1816],"tags":[1519],"ppma_author":[8937],"class_list":["post-2436","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","category-asp-dotnet","category-couchbase-architecture","category-couchbase-server","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>Docker and ASP.NET Core with Couchbase Server - 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\/docker-and-asp-net-core-with-couchbase-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Docker and ASP.NET Core with Couchbase Server\" \/>\n<meta property=\"og:description\" content=\"In many of my blog posts and samples, I use a single Couchbase Server node. I do this because it\u2019s easy, and much of what I demonstrate can be done with a single node. However, Couchbase Server is typically run [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-11-14T20:10:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-14T02:40:28+00:00\" \/>\n<meta name=\"author\" content=\"Matthew Groves\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@mgroves\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Matthew Groves\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/\"},\"author\":{\"name\":\"Matthew Groves\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3929663e372020321b0152dc4fa65a58\"},\"headline\":\"Docker and ASP.NET Core with Couchbase Server\",\"datePublished\":\"2016-11-14T20:10:50+00:00\",\"dateModified\":\"2025-06-14T02:40:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/\"},\"wordCount\":1046,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"keywords\":[\"docker\"],\"articleSection\":[\".NET\",\"ASP.NET\",\"Couchbase Architecture\",\"Couchbase Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/\",\"name\":\"Docker and ASP.NET Core with Couchbase Server - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2016-11-14T20:10:50+00:00\",\"dateModified\":\"2025-06-14T02:40:28+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/#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\/docker-and-asp-net-core-with-couchbase-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Docker and ASP.NET Core with Couchbase Server\"}]},{\"@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\/3929663e372020321b0152dc4fa65a58\",\"name\":\"Matthew Groves\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/ba51e6aacc53995c323a634e4502ef54\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g\",\"caption\":\"Matthew Groves\"},\"description\":\"Matthew D. Groves is a guy who loves to code. It doesn't matter if it's C#, jQuery, or PHP: he'll submit pull requests for anything. He has been coding professionally ever since he wrote a QuickBASIC point-of-sale app for his parent's pizza shop back in the 90s. He currently works as a Senior Product Marketing Manager for Couchbase. His free time is spent with his family, watching the Reds, and getting involved in the developer community. He is the author of AOP in .NET, Pro Microservices in .NET, a Pluralsight author, and a Microsoft MVP.\",\"sameAs\":[\"https:\/\/crosscuttingconcerns.com\",\"https:\/\/x.com\/mgroves\"],\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/matthew-groves\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Docker and ASP.NET Core with Couchbase Server - 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\/docker-and-asp-net-core-with-couchbase-server\/","og_locale":"en_US","og_type":"article","og_title":"Docker and ASP.NET Core with Couchbase Server","og_description":"In many of my blog posts and samples, I use a single Couchbase Server node. I do this because it\u2019s easy, and much of what I demonstrate can be done with a single node. However, Couchbase Server is typically run [&hellip;]","og_url":"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/","og_site_name":"The Couchbase Blog","article_published_time":"2016-11-14T20:10:50+00:00","article_modified_time":"2025-06-14T02:40:28+00:00","author":"Matthew Groves","twitter_card":"summary_large_image","twitter_creator":"@mgroves","twitter_misc":{"Written by":"Matthew Groves","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/"},"author":{"name":"Matthew Groves","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/3929663e372020321b0152dc4fa65a58"},"headline":"Docker and ASP.NET Core with Couchbase Server","datePublished":"2016-11-14T20:10:50+00:00","dateModified":"2025-06-14T02:40:28+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/"},"wordCount":1046,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","keywords":["docker"],"articleSection":[".NET","ASP.NET","Couchbase Architecture","Couchbase Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/","url":"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/","name":"Docker and ASP.NET Core with Couchbase Server - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2022\/11\/couchbase-nosql-dbaas.png","datePublished":"2016-11-14T20:10:50+00:00","dateModified":"2025-06-14T02:40:28+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/docker-and-asp-net-core-with-couchbase-server\/#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\/docker-and-asp-net-core-with-couchbase-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Docker and ASP.NET Core with Couchbase Server"}]},{"@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\/3929663e372020321b0152dc4fa65a58","name":"Matthew Groves","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/ba51e6aacc53995c323a634e4502ef54","url":"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g","caption":"Matthew Groves"},"description":"Matthew D. Groves is a guy who loves to code. It doesn't matter if it's C#, jQuery, or PHP: he'll submit pull requests for anything. He has been coding professionally ever since he wrote a QuickBASIC point-of-sale app for his parent's pizza shop back in the 90s. He currently works as a Senior Product Marketing Manager for Couchbase. His free time is spent with his family, watching the Reds, and getting involved in the developer community. He is the author of AOP in .NET, Pro Microservices in .NET, a Pluralsight author, and a Microsoft MVP.","sameAs":["https:\/\/crosscuttingconcerns.com","https:\/\/x.com\/mgroves"],"url":"https:\/\/www.couchbase.com\/blog\/author\/matthew-groves\/"}]}},"authors":[{"term_id":8937,"user_id":71,"is_guest":0,"slug":"matthew-groves","display_name":"Matthew Groves","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/70feb1b28a099ad0112b8d21fe1e81e1a4524beed3e20b7f107d5370e85a07ab?s=96&d=mm&r=g","author_category":"","last_name":"Groves","first_name":"Matthew","job_title":"","user_url":"https:\/\/crosscuttingconcerns.com","description":"Matthew D. Groves is a guy who loves to code.  It doesn't matter if it's C#, jQuery, or PHP: he'll submit pull requests for anything.  He has been coding professionally ever since he wrote a QuickBASIC point-of-sale app for his parent's pizza shop back in the 90s.  He currently works as a Senior Product Marketing Manager for Couchbase. His free time is spent with his family, watching the Reds, and getting involved in the developer community.  He is the author of AOP in .NET, Pro Microservices in .NET, a Pluralsight author, and a Microsoft MVP."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2436","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\/71"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=2436"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/2436\/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=2436"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=2436"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=2436"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=2436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}