{"id":10884,"date":"2025-08-17T20:31:24","date_gmt":"2025-08-17T20:31:24","guid":{"rendered":"https:\/\/putridparrot.com\/blog\/?p=10884"},"modified":"2025-08-17T20:31:24","modified_gmt":"2025-08-17T20:31:24","slug":"iis-in-docker","status":"publish","type":"post","link":"https:\/\/putridparrot.com\/blog\/iis-in-docker\/","title":{"rendered":"IIS in Docker"},"content":{"rendered":"<p>With the ability to use Windows based Docker images we can now deploy an IIS Docker image to host our sites (and it&#8217;s pretty simple)<\/p>\n<p><em>Would you want to use Windows and IIS? Possibly not but this post is a primer for deploying ASP.NET framework apps. to Docker, so just shows what&#8217;s possible.<\/em><\/p>\n<p>Let&#8217;s jump start in and look at the Dockerfile<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nFROM mcr.microsoft.com\/windows\/servercore\/iis:windowsservercore-ltsc2019 \r\n\r\nCOPY wwwroot \/inetpub\/wwwroot\/\r\n<\/pre>\n<p>This assumes that your HTML etc. reside in a folder named wwwroot off of the folder containing the Dockerfile. You can replace COPY with ADD if preferred to get the capability of extracting compressed files as part of the copy.<\/p>\n<p>Now build this using <\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ndocker build -t ns\/mysite:0.1.0 .\r\n<\/pre>\n<p>Change <em>ns\/mysite:0.1.0<\/em> to your preferred tag name. Next run using<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ndocker run --name mysite -p 80:80 -d ns\/mysite:0.1.0\r\n<\/pre>\n<p>Now from your browser go to http:\/\/localhost and access the HTML pages etc.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With the ability to use Windows based Docker images we can now deploy an IIS Docker image to host our sites (and it&#8217;s pretty simple) Would you want to use Windows and IIS? Possibly not but this post is a primer for deploying ASP.NET framework apps. to Docker, so just shows what&#8217;s possible. Let&#8217;s jump [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[102,182],"tags":[],"class_list":["post-10884","post","type-post","status-publish","format-standard","hentry","category-docker","category-iis"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/10884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/comments?post=10884"}],"version-history":[{"count":2,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/10884\/revisions"}],"predecessor-version":[{"id":10886,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/10884\/revisions\/10886"}],"wp:attachment":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/media?parent=10884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/categories?post=10884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/tags?post=10884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}