{"id":14196,"date":"2020-12-15T16:00:53","date_gmt":"2020-12-15T15:00:53","guid":{"rendered":""},"modified":"2020-12-15T11:05:38","modified_gmt":"2020-12-15T10:05:38","slug":"run-blazor-in-a-docker-container-with-visual-studio-code-remote-development","status":"publish","type":"post","link":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/","title":{"rendered":"Run Blazor in a Docker container with Visual Studio Code Remote Development"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-full size-full\" src=\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2019\/06\/blazorheader.jpg\" alt=\"The Blazor logo, with a picture of Bit the Raccoon on the right.\" width=\"1920\" height=\"700\" \/><\/p>\n<p><a href=\"https:\/\/code.visualstudio.com\/docs\/remote\/remote-overview\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Remote Development<\/strong><\/a> is by far one of my fave extensions in <strong>Visual Studio Code<\/strong>. It\u2019s only available in the <a href=\"https:\/\/code.visualstudio.com\/insiders\/\" target=\"_blank\" rel=\"noopener noreferrer\">Insiders preview<\/a> for now, but it\u2019s a <strong>must-try<\/strong>. What does it do? It basically allows your Visual Studio Code instance to connect to a <strong>remote development environment<\/strong>, whether it&#8217;s a <strong>Virtual Machine<\/strong>, a <strong>Windows Subsystem<\/strong> for Linux instance or a <strong>Docker container<\/strong>, and use it to compile, execute and debug your code.<\/p>\n<p>Some of the use cases are:<\/p>\n<ul>\n<li>I don\u2019t have a <strong>Node SDK<\/strong> on my machine, but I\u2019d like to run a <strong>ReactJS<\/strong> application<\/li>\n<li>I\u2019d prefer not to install a preview-XYZ version of <strong>.NET Core 3<\/strong>, it\u2019s just annoying to update it every time there\u2019s a new release, better to just drop a container and recreate it with the latest bits<\/li>\n<li>I run a <strong>Windows<\/strong> machine, but the tooling and the dependencies of my application run on <strong>Linux<\/strong> (e.g. <strong>Redis<\/strong>), it would be great to have everything available at the press of an F5<\/li>\n<\/ul>\n<p>In this article, I\u2019m going to show how we can use it to run and debug a <a href=\"https:\/\/dotnet.microsoft.com\/apps\/aspnet\/web-apps\/client\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Blazor application<\/strong><\/a> in a Docker container, without having to install the SDK.<\/p>\n<p>What do we need as a pre-req?<\/p>\n<ul>\n<li><strong>Visual Studio Code Insiders<\/strong> preview (the green icon version): get the installer <a href=\"https:\/\/code.visualstudio.com\/insiders\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a><\/li>\n<li>The <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode-remote.vscode-remote-extensionpack\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Remote Development<\/strong> extension pack<\/a><\/li>\n<li><a href=\"https:\/\/www.docker.com\/products\/docker-desktop\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Docker Desktop<\/strong><\/a> for your Windows\/Mac machine<\/li>\n<\/ul>\n<p>That&#8217;s all \ud83d\ude42<\/p>\n<p>&nbsp;<\/p>\n<h2>Let\u2019s get started!<\/h2>\n<p>After having created an empty folder and opened it in <strong>Visual Studio Code<\/strong>, the next step is creating a <strong>Container Configuration File<\/strong>. We can easily do it from the command palette:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-full size-full\" src=\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2019\/06\/blazorindocker1.png\" alt=\"Creating a\u00a0Container Configuration File from the command palette:\" width=\"1122\" height=\"651\" \/><\/p>\n<p>The add-in comes with quite a substantial list of <strong>pre-defined templates<\/strong>, including Node, .NET Core, Java, Azure Functions, etc. You can definitely build your own\u200a\u2014\u200athey\u2019re quite self-explanatory as we\u2019re going to shortly see\u200a\u2014\u200abut <strong>.NET Core (latest)<\/strong> is the one we want to pick for our example.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-full size-full\" src=\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2019\/06\/blazorindocker2.png\" alt=\"Picking the .NET Core (latest) pre-defined template.\" width=\"1208\" height=\"967\" \/><\/p>\n<p>This will add two files to our folder:<\/p>\n<ul>\n<li>a <strong>Dockerfile<\/strong>, which defines the SDK image we\u2019re going to remote on<\/li>\n<li>a <strong>devcontainer.json file<\/strong>, which indicates to Visual Studio Code how to spin up our dev environment.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>Preparing our dev environment in Docker<\/h2>\n<p>We are going to make a few changes to both of them. Let\u2019s head to the <a href=\"https:\/\/gist.github.com\/cradle77\/d9362d4302378696bc34033ceb4d8008#file-dockerfile\" target=\"_blank\" rel=\"noopener noreferrer\">Dockerfile<\/a> on GitHub first:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-full size-full\" src=\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2019\/06\/dockerfile.png\" alt=\"Dockerfile (from Github)\" width=\"1483\" height=\"648\" \/><\/p>\n<p>Two changes here:<\/p>\n<ul>\n<li>We are <em>\u201cinheriting\u201d<\/em> our image from the <strong>.NET Core SDK 3.0<\/strong>, by selecting the <code>sdk:3.0<\/code> base image<\/li>\n<li>By default, the base SDK comes only with the <a href=\"https:\/\/docs.microsoft.com\/en-us\/aspnet\/core\/blazor\/hosting-models?view=aspnetcore-3.0#server-side\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>server side<\/strong><\/a> version of <strong>Blazor<\/strong> pre-installed. Therefore, in line #16, we install the preview project templates for <a href=\"https:\/\/docs.microsoft.com\/en-us\/aspnet\/core\/blazor\/hosting-models?view=aspnetcore-3.0#client-side\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Blazor Client Side<\/strong><\/a>.<\/li>\n<\/ul>\n<p>The other file is <a href=\"https:\/\/gist.github.com\/cradle77\/b434e51006485ba4fc519c50ee32f02c#file-devcontainer-json\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>devcontainer.json<\/strong><\/a> and contains some additional specs for Visual Studio Code on <strong>how to spin up<\/strong> our environment:<\/p>\n<pre>{\r\n    \"name\": \"C# (.NET Core Latest)\",\r\n    \"dockerFile\": \"Dockerfile\",\r\n\r\n    \"appPort\": [\r\n      \"5000:5000\",\r\n      \"5001:5001\"\r\n    ],\r\n\r\n    \"shutdownAction\": \"stopContainer\",\r\n\r\n    \"extensions\": [\r\n      \"ms-vscode.csharp\"\r\n    ]\r\n}<\/pre>\n<p>The content is pretty simple:<\/p>\n<ul>\n<li>in line #3 we reference the <strong>Dockerfile we want to use<\/strong> for the image<\/li>\n<li>in line #5 we <strong>expose a couple of ports<\/strong> to the host machine<\/li>\n<li>in line #10 we select that we want to <strong>stop the container<\/strong> when we quit Visual Studio Code<\/li>\n<li>in line #12 we can pre-install some <strong>IDE extensions<\/strong> if needed. I\u2019ve left this to the default value, which is C# for Visual Studio Code.<\/li>\n<\/ul>\n<p>That\u2019s really it! At this point all we have to do is selecting the \u201c<strong>Reopen folder in container<\/strong>\u201d option to start playing with our new SDK:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-full size-full\" src=\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2019\/06\/blazorindocker3.png\" alt=\"Selecting the \u201cReopen folder in container\u201d option\" width=\"1100\" height=\"626\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>Enter Remote Development Mode<\/h2>\n<p>As soon as we do it, Visual Studio Code will automatically start building the <strong>Docker image<\/strong> (it might take a few minutes the first time as we have to download a couple of GBs), then it will spin up a container and connect to it, as we can see from the status bar on the bottom left corner.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-full size-full aligncenter\" src=\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2019\/06\/blazorindocker4.png\" alt=\"The status bar on the bottom left corner\" width=\"579\" height=\"72\" \/><\/p>\n<p>Also, executing a <code>docker ps<\/code> command shows the running container we are currently using:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-full size-full aligncenter\" src=\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2019\/06\/blazorindocker5.png\" alt=\"A\u00a0'docker ps'\u00a0command showing the running container we are currently using.\" width=\"2400\" height=\"288\" \/><\/p>\n<p>This is now our playground: it mounts the folder in our host machine as a <strong>container volume<\/strong>, which means that we can seamlessly edit it from the host machine or within the container itself.<\/p>\n<p>For example, we can create a new terminal instance\u200a\u2014\u200awhich will open a <strong>bash shell<\/strong> in the container\u200a\u2014\u200aand do a <code>dotnet new blazorhosted<\/code> to create a new solution using the <strong>Blazor ASP.NET Core Hosted<\/strong> template.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-full size-full\" src=\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2019\/06\/blazorindocker6.png\" alt=\"Using\u00a0'dotnet new blazorhosted'\u00a0to create a new solution using the\u00a0Blazor ASP.NET Core Hosted\u00a0template, in a bash shell\" width=\"1062\" height=\"186\" \/><\/p>\n<p>This will generate the 3 projects this template is made of.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-full size-full aligncenter\" src=\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2019\/06\/blazorindocker7.png\" alt=\"The three projects that were generated.\" width=\"475\" height=\"335\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>Let\u2019s run it!<\/h2>\n<p>How do we run it? Well, it\u2019s just a matter of pressing F5 and select the <strong>.NET Core<\/strong> template to create the proper <strong>launch.json<\/strong> file:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-full size-full\" src=\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2019\/06\/blazorindocker8.png\" alt=\"Pressing F5 to select the\u00a0.NET Core\u00a0template and creating the proper\u00a0launch.json\u00a0file\" width=\"1672\" height=\"1144\" \/><\/p>\n<p>Before launching it, we might want to force <strong>Kestrel<\/strong> to use the two ports 5000 and 5001 we have previously exposed. We can do it by adding an <code>ASPNETCORE_URLS<\/code> environment variable:<\/p>\n<pre>\"env\": {\r\n    \"ASPNETCORE_ENVIRONMENT\": \"Development\",\r\n    \"ASPNETCORE_URLS\": \"http:\/\/*:5000;https:\/\/*:5001\"\r\n},<\/pre>\n<p>We are finally ready! Press F5 again and Visual Studio Code will <strong>start our application<\/strong> and <strong>attach to the process<\/strong>. If we then open a browser and head to http:\/\/localhost:5000 we\u2019ll see our new shiny <strong>Blazor<\/strong> application up and running as expected.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-full size-full\" src=\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2019\/06\/blazorindocker9.png\" alt=\"The Blazor application appearing at localhost:5000\" width=\"997\" height=\"480\" \/><\/p>\n<p>What about the debugger? Well, we have to think about *what* we want to debug: it works as expected for the code running on the server-side. We can in fact <strong>set a breakpoint<\/strong> and see it being hit when we come across it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-full size-full\" src=\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2019\/06\/blazorindocker10.png\" alt=\"Setting a breakpoint\" width=\"2163\" height=\"737\" \/><\/p>\n<p>Unfortunately client-side Blazor is not supported, and this is for a couple of reasons:<\/p>\n<ol>\n<li>The <strong>integration<\/strong> with Visual Studio Code is not there yet<\/li>\n<li>A <strong>Web Assembly application<\/strong> runs in the <strong>browser<\/strong>, so you need the debugger to attach your <em>msedge.exe<\/em> or your <em>chrome.exe<\/em> processes, which is obviously not possible when running in remote development mode.<\/li>\n<\/ol>\n<p>No problems whatsoever with Blazor running <strong>server-side<\/strong>: in this mode, the page code runs <strong>on the server<\/strong>, and the client communicates with it via <strong>websocket<\/strong>. Therefore, we can set a breakpoint in a <strong>.razor<\/strong> page file and the debugger will stop the execution as expected.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"attachment-full size-full\" src=\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2019\/06\/blazorindocker11.png\" alt=\"Setting a breakpoint in a\u00a0.razor\u00a0page file\" width=\"2040\" height=\"785\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>Wrapping up<\/h2>\n<p>The new <strong>Remote Development<\/strong> extension is a deal breaker in terms of flexibility of <strong>Visual Studio Code<\/strong>: it guides us through the process of attaching to a development environment sitting either in a <strong>Virtual Machine<\/strong>, in <strong>WSL<\/strong> or on a <strong>Docker<\/strong> container.<\/p>\n<p>The latter is probably the most interesting option in a number of different contexts, such as spiking different frameworks\/SDKs or running Linux components in a Windows system.<\/p>\n<p>During this article we\u2019ve investigated how to use it to run a <strong>Blazor ASP.NET Core<\/strong> application, consuming it through our browser and debugging it in Visual Studio Code.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Remote Development is by far one of my fave extensions in Visual Studio Code. It\u2019s only available in the Insiders preview for now, but it\u2019s a must-try.<\/p>\n","protected":false},"author":430,"featured_media":29538,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false,"_classifai_error":"","_classifai_text_to_speech_error":"","footnotes":""},"categories":[1],"post_tag":[519],"content-type":[],"coauthors":[585],"class_list":["post-14196","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cross-industry","tag-technet-uk"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Run Blazor in a Docker container with Visual Studio Code Remote Development - Microsoft Industry Blogs - United Kingdom<\/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.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Run Blazor in a Docker container with Visual Studio Code Remote Development - Microsoft Industry Blogs - United Kingdom\" \/>\n<meta property=\"og:description\" content=\"Remote Development is by far one of my fave extensions in Visual Studio Code. It\u2019s only available in the Insiders preview for now, but it\u2019s a must-try.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/\" \/>\n<meta property=\"og:site_name\" content=\"Microsoft Industry Blogs - United Kingdom\" \/>\n<meta property=\"article:published_time\" content=\"2020-12-15T15:00:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/03\/VisualStudioThumb.png\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"450\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Marco De Sanctis\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Marco De Sanctis\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 min read\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/\"},\"author\":[{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/author\/marco-de-sanctis\/\",\"@type\":\"Person\",\"@name\":\"Marco De Sanctis\"}],\"headline\":\"Run Blazor in a Docker container with Visual Studio Code Remote Development\",\"datePublished\":\"2020-12-15T15:00:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/\"},\"wordCount\":1074,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/03\/VisualStudioThumb.png\",\"keywords\":[\"TechNet UK\"],\"articleSection\":[\"Cross-industry\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/\",\"url\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/\",\"name\":\"Run Blazor in a Docker container with Visual Studio Code Remote Development - Microsoft Industry Blogs - United Kingdom\",\"isPartOf\":{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/03\/VisualStudioThumb.png\",\"datePublished\":\"2020-12-15T15:00:53+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/#primaryimage\",\"url\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/03\/VisualStudioThumb.png\",\"contentUrl\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/03\/VisualStudioThumb.png\",\"width\":800,\"height\":450,\"caption\":\"The Visual Studio logo, next to an image of Bit the Raccoon.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Run Blazor in a Docker container with Visual Studio Code Remote Development\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#website\",\"url\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/\",\"name\":\"Microsoft Industry Blogs - United Kingdom\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#organization\",\"name\":\"Microsoft Industry Blogs - United Kingdom\",\"url\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2019\/08\/Microsoft-Logo.png\",\"contentUrl\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2019\/08\/Microsoft-Logo.png\",\"width\":259,\"height\":194,\"caption\":\"Microsoft Industry Blogs - United Kingdom\"},\"image\":{\"@id\":\"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Run Blazor in a Docker container with Visual Studio Code Remote Development - Microsoft Industry Blogs - United Kingdom","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.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/","og_locale":"en_US","og_type":"article","og_title":"Run Blazor in a Docker container with Visual Studio Code Remote Development - Microsoft Industry Blogs - United Kingdom","og_description":"Remote Development is by far one of my fave extensions in Visual Studio Code. It\u2019s only available in the Insiders preview for now, but it\u2019s a must-try.","og_url":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/","og_site_name":"Microsoft Industry Blogs - United Kingdom","article_published_time":"2020-12-15T15:00:53+00:00","og_image":[{"width":800,"height":450,"url":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/03\/VisualStudioThumb.png","type":"image\/png"}],"author":"Marco De Sanctis","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Marco De Sanctis","Est. reading time":"4 min read"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/#article","isPartOf":{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/"},"author":[{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/author\/marco-de-sanctis\/","@type":"Person","@name":"Marco De Sanctis"}],"headline":"Run Blazor in a Docker container with Visual Studio Code Remote Development","datePublished":"2020-12-15T15:00:53+00:00","mainEntityOfPage":{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/"},"wordCount":1074,"commentCount":0,"publisher":{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#organization"},"image":{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/#primaryimage"},"thumbnailUrl":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/03\/VisualStudioThumb.png","keywords":["TechNet UK"],"articleSection":["Cross-industry"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/","url":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/","name":"Run Blazor in a Docker container with Visual Studio Code Remote Development - Microsoft Industry Blogs - United Kingdom","isPartOf":{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/#primaryimage"},"image":{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/#primaryimage"},"thumbnailUrl":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/03\/VisualStudioThumb.png","datePublished":"2020-12-15T15:00:53+00:00","breadcrumb":{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/#primaryimage","url":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/03\/VisualStudioThumb.png","contentUrl":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2020\/03\/VisualStudioThumb.png","width":800,"height":450,"caption":"The Visual Studio logo, next to an image of Bit the Raccoon."},{"@type":"BreadcrumbList","@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/cross-industry\/2020\/12\/15\/run-blazor-in-a-docker-container-with-visual-studio-code-remote-development\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/"},{"@type":"ListItem","position":2,"name":"Run Blazor in a Docker container with Visual Studio Code Remote Development"}]},{"@type":"WebSite","@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#website","url":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/","name":"Microsoft Industry Blogs - United Kingdom","description":"","publisher":{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#organization","name":"Microsoft Industry Blogs - United Kingdom","url":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2019\/08\/Microsoft-Logo.png","contentUrl":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-content\/uploads\/sites\/22\/2019\/08\/Microsoft-Logo.png","width":259,"height":194,"caption":"Microsoft Industry Blogs - United Kingdom"},"image":{"@id":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/posts\/14196","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/users\/430"}],"replies":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/comments?post=14196"}],"version-history":[{"count":0,"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/posts\/14196\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/media\/29538"}],"wp:attachment":[{"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/media?parent=14196"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/categories?post=14196"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/post_tag?post=14196"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/content-type?post=14196"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-gb\/industry\/blog\/wp-json\/wp\/v2\/coauthors?post=14196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}