{"action":"created","comment":{"url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/pulls/comments/47813739","id":47813739,"diff_hunk":"@@ -0,0 +1,121 @@\n+---\n+layout: post\n+title: \"Windows Server 2016, Docker and Sitecore\"\n+date: 2015-12-16 10:45\n+comments: false\n+author: Jimmy Rudley\n+published: true\n+categories:\n+    - Windows Server 2016 Technical Preview 4\n+    - Docker\n+    - Sitecore\n+---\n+\n+At SUGCON 2015, Rackspace and Hedgehog presented about how using Docker will shape the way we work with Sitecore, an ASP.Net web content management system. With the release of Windows Server 2016 Technical Preview 4, we are now able to run Sitecore in a Docker container. \n+\n+<!-- more -->\n+Why run Sitecore in a Docker container? Here are a few challenges that are now solved:\n+  - Consistent enviornments for production, staging, dev, qa\n+  - Portability of Docker images\n+  - Can add additional containers in seconds to scale out\n+  - Can roll back to older images in seconds if code does not work as expected\n+\n+To start running Docker containers, we will need a Docker host. Microsoft wrote a PowerShell script that can configure the VM host for you if you are running Windows 10 or Windows Server 2016 TP2+. You can grab the detailed instructions here\n+\n+My main objective is to take an existing sitecore 8.0 installation on my laptop and move it into a container image. I used the sitecore web application installer to do a quick local installation. I am using SQL Azure for my sql server, but as long as you can hit your sql server from your container, however you choose to host the DB's will work just fine.\n+\n+Once you setup your Docker host, we need to create our IIS image. If you type the following command \n+```sh\n+docker images\n+```\n+You will see a list of available images on your Docker host. Let's now search the Microsoft repo for what images are available by typing\n+```sh\n+docker search microsoft\n+```\n+You will see a list of images available to pull down. There is a good spread of images from ruby, redis, asp.net 5, iis, etc. We could build our own image by launching a new container and installing IIS and asp.net, but let's pull an image down instead. On your docker host, let's create a new directory called c:\\iisdemo. We will use this directory to hold our dockerfile we will create. A dockerfile is just a set of instructions to build a docker image. Let's launch notepad.exe and type in the following docker instructions\n+```sh\n+FROM microsoft/iis\n+RUN dism /online /enable-feature /all /featurename:IIS-ASPNET45 /NoRestart\n+```\n+Alternatively, we could use powershell to install asp.net 4.5. That dockerfile would look like\n+```sh\n+FROM microsoft/iis\n+RUN powershell -executionpolicy bypass -command \"add-windowsfeature Web-Asp-Net45\"\n+```\n+Please save your dockerfile to c:\\iisdemo and called it \"dockerfile\". Let's breakdown the dockerfile so you understand what we are trying to accomplish.\n+The FROM keyword sets the base image for subsequent instructions. We are telling docker to use the microsoft/iis image. We do not have this locally, but Docker is smart enough to pull it down locally for us. The RUN keyword will execute any commands in a new layer on top of the current image and commit the results. I am telling it to run dism to install the asp.net 4.5 features for IIS.\n+\n+Let's build our image by running\n+```sh\n+docker build -t iisdemo c:\\iisdemo\\\n+```\n+We will tag our new image and read our dockerfile from the directory c:\\iisdemo\\. Here is snippet of the build process\n+```sh\n+c:\\>docker build -t iisdemo c:\\iisdemo\\\n+Sending build context to Docker daemon 2.048 kB\n+Step 1 : FROM microsoft/iis\n+latest: Pulling from microsoft/iis\n+6a182c7eba7e: Pull complete\n+39b8f98ccaf1: Pull complete\n+Digest: sha256:a067c38b623c411e2cdcb8425860c894730cb27c021dd1f1cb479cd21a031cd7\n+Status: Downloaded newer image for microsoft/iis:latest\n+ ---> 39b8f98ccaf1\n+Step 2 : RUN dism /online /enable-feature /all /featurename:IIS-ASPNET45 /NoRestart\n+ ---> Running in c9f7059858d3\n+ ```\n+\n+If you now type\n+```sh\n+docker images\n+```\n+You will see your new image in our local repo called iisdemo.","path":"_posts/2015-12-16-Windows-Server-2016-Docker-and-Sitecore.md","position":105,"original_position":71,"commit_id":"dcf311e4de238151ba6e741485e07d59561c685e","original_commit_id":"aaed4ff18846b1069a94804676ed2213ce2454e3","user":{"login":"stephamon","id":12717324,"avatar_url":"https://avatars.githubusercontent.com/u/12717324?v=3","gravatar_id":"","url":"https://api.github.com/users/stephamon","html_url":"https://github.com/stephamon","followers_url":"https://api.github.com/users/stephamon/followers","following_url":"https://api.github.com/users/stephamon/following{/other_user}","gists_url":"https://api.github.com/users/stephamon/gists{/gist_id}","starred_url":"https://api.github.com/users/stephamon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephamon/subscriptions","organizations_url":"https://api.github.com/users/stephamon/orgs","repos_url":"https://api.github.com/users/stephamon/repos","events_url":"https://api.github.com/users/stephamon/events{/privacy}","received_events_url":"https://api.github.com/users/stephamon/received_events","type":"User","site_admin":false},"body":":+1:","created_at":"2015-12-16T18:28:38Z","updated_at":"2015-12-16T18:28:38Z","html_url":"https://github.com/rackerlabs/docs-developer-blog/pull/150#discussion_r47813739","pull_request_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/pulls/150","_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/docs-developer-blog/pulls/comments/47813739"},"html":{"href":"https://github.com/rackerlabs/docs-developer-blog/pull/150#discussion_r47813739"},"pull_request":{"href":"https://api.github.com/repos/rackerlabs/docs-developer-blog/pulls/150"}}},"pull_request":{"url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/pulls/150","id":53868347,"html_url":"https://github.com/rackerlabs/docs-developer-blog/pull/150","diff_url":"https://github.com/rackerlabs/docs-developer-blog/pull/150.diff","patch_url":"https://github.com/rackerlabs/docs-developer-blog/pull/150.patch","issue_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/issues/150","number":150,"state":"open","locked":false,"title":"Windows Server 2016, Docker and Sitecore","user":{"login":"jrudley","id":1934411,"avatar_url":"https://avatars.githubusercontent.com/u/1934411?v=3","gravatar_id":"","url":"https://api.github.com/users/jrudley","html_url":"https://github.com/jrudley","followers_url":"https://api.github.com/users/jrudley/followers","following_url":"https://api.github.com/users/jrudley/following{/other_user}","gists_url":"https://api.github.com/users/jrudley/gists{/gist_id}","starred_url":"https://api.github.com/users/jrudley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrudley/subscriptions","organizations_url":"https://api.github.com/users/jrudley/orgs","repos_url":"https://api.github.com/users/jrudley/repos","events_url":"https://api.github.com/users/jrudley/events{/privacy}","received_events_url":"https://api.github.com/users/jrudley/received_events","type":"User","site_admin":false},"body":"author(s) mini bio, soft capped to 75 words: I have spent the past 8 years developing automation for the Window's and Cloud platforms at Microsoft and Rackspace. I currently work in the Rackspace Digital Practice Area focusing on Sitecore, Azure and automation.\r\nauthor(s) social media contact info: N/A\r\naccept or decline to allow redaction, editing or structure changes by technical writer staff: accept\r\ndesired date of publishing:ASAP\r\nwhether or not you're willing to answer comments about your post (see step #5 above):False\r\n","created_at":"2015-12-16T16:58:19Z","updated_at":"2015-12-16T18:28:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af1409ee41e59102b3c456af65632f4d877ccd4c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/pulls/150/commits","review_comments_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/pulls/150/comments","review_comment_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/issues/150/comments","statuses_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/statuses/dcf311e4de238151ba6e741485e07d59561c685e","head":{"label":"jrudley:2015-12-16-Windows-Server-2016-Docker-and-Sitecore","ref":"2015-12-16-Windows-Server-2016-Docker-and-Sitecore","sha":"dcf311e4de238151ba6e741485e07d59561c685e","user":{"login":"jrudley","id":1934411,"avatar_url":"https://avatars.githubusercontent.com/u/1934411?v=3","gravatar_id":"","url":"https://api.github.com/users/jrudley","html_url":"https://github.com/jrudley","followers_url":"https://api.github.com/users/jrudley/followers","following_url":"https://api.github.com/users/jrudley/following{/other_user}","gists_url":"https://api.github.com/users/jrudley/gists{/gist_id}","starred_url":"https://api.github.com/users/jrudley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrudley/subscriptions","organizations_url":"https://api.github.com/users/jrudley/orgs","repos_url":"https://api.github.com/users/jrudley/repos","events_url":"https://api.github.com/users/jrudley/events{/privacy}","received_events_url":"https://api.github.com/users/jrudley/received_events","type":"User","site_admin":false},"repo":{"id":47411082,"name":"docs-developer-blog","full_name":"jrudley/docs-developer-blog","owner":{"login":"jrudley","id":1934411,"avatar_url":"https://avatars.githubusercontent.com/u/1934411?v=3","gravatar_id":"","url":"https://api.github.com/users/jrudley","html_url":"https://github.com/jrudley","followers_url":"https://api.github.com/users/jrudley/followers","following_url":"https://api.github.com/users/jrudley/following{/other_user}","gists_url":"https://api.github.com/users/jrudley/gists{/gist_id}","starred_url":"https://api.github.com/users/jrudley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrudley/subscriptions","organizations_url":"https://api.github.com/users/jrudley/orgs","repos_url":"https://api.github.com/users/jrudley/repos","events_url":"https://api.github.com/users/jrudley/events{/privacy}","received_events_url":"https://api.github.com/users/jrudley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jrudley/docs-developer-blog","description":"The developer.rackspace.com blog.","fork":true,"url":"https://api.github.com/repos/jrudley/docs-developer-blog","forks_url":"https://api.github.com/repos/jrudley/docs-developer-blog/forks","keys_url":"https://api.github.com/repos/jrudley/docs-developer-blog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jrudley/docs-developer-blog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jrudley/docs-developer-blog/teams","hooks_url":"https://api.github.com/repos/jrudley/docs-developer-blog/hooks","issue_events_url":"https://api.github.com/repos/jrudley/docs-developer-blog/issues/events{/number}","events_url":"https://api.github.com/repos/jrudley/docs-developer-blog/events","assignees_url":"https://api.github.com/repos/jrudley/docs-developer-blog/assignees{/user}","branches_url":"https://api.github.com/repos/jrudley/docs-developer-blog/branches{/branch}","tags_url":"https://api.github.com/repos/jrudley/docs-developer-blog/tags","blobs_url":"https://api.github.com/repos/jrudley/docs-developer-blog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jrudley/docs-developer-blog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jrudley/docs-developer-blog/git/refs{/sha}","trees_url":"https://api.github.com/repos/jrudley/docs-developer-blog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jrudley/docs-developer-blog/statuses/{sha}","languages_url":"https://api.github.com/repos/jrudley/docs-developer-blog/languages","stargazers_url":"https://api.github.com/repos/jrudley/docs-developer-blog/stargazers","contributors_url":"https://api.github.com/repos/jrudley/docs-developer-blog/contributors","subscribers_url":"https://api.github.com/repos/jrudley/docs-developer-blog/subscribers","subscription_url":"https://api.github.com/repos/jrudley/docs-developer-blog/subscription","commits_url":"https://api.github.com/repos/jrudley/docs-developer-blog/commits{/sha}","git_commits_url":"https://api.github.com/repos/jrudley/docs-developer-blog/git/commits{/sha}","comments_url":"https://api.github.com/repos/jrudley/docs-developer-blog/comments{/number}","issue_comment_url":"https://api.github.com/repos/jrudley/docs-developer-blog/issues/comments{/number}","contents_url":"https://api.github.com/repos/jrudley/docs-developer-blog/contents/{+path}","compare_url":"https://api.github.com/repos/jrudley/docs-developer-blog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jrudley/docs-developer-blog/merges","archive_url":"https://api.github.com/repos/jrudley/docs-developer-blog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jrudley/docs-developer-blog/downloads","issues_url":"https://api.github.com/repos/jrudley/docs-developer-blog/issues{/number}","pulls_url":"https://api.github.com/repos/jrudley/docs-developer-blog/pulls{/number}","milestones_url":"https://api.github.com/repos/jrudley/docs-developer-blog/milestones{/number}","notifications_url":"https://api.github.com/repos/jrudley/docs-developer-blog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jrudley/docs-developer-blog/labels{/name}","releases_url":"https://api.github.com/repos/jrudley/docs-developer-blog/releases{/id}","created_at":"2015-12-04T15:11:48Z","updated_at":"2015-12-04T15:11:51Z","pushed_at":"2015-12-16T18:26:25Z","git_url":"git://github.com/jrudley/docs-developer-blog.git","ssh_url":"git@github.com:jrudley/docs-developer-blog.git","clone_url":"https://github.com/jrudley/docs-developer-blog.git","svn_url":"https://github.com/jrudley/docs-developer-blog","homepage":null,"size":60758,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rackerlabs:master","ref":"master","sha":"736197cf63800a19e9afe4f5afe44a588301e3b8","user":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":36315867,"name":"docs-developer-blog","full_name":"rackerlabs/docs-developer-blog","owner":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackerlabs/docs-developer-blog","description":"The developer.rackspace.com blog.","fork":false,"url":"https://api.github.com/repos/rackerlabs/docs-developer-blog","forks_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/forks","keys_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/teams","hooks_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/hooks","issue_events_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/issues/events{/number}","events_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/events","assignees_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/assignees{/user}","branches_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/branches{/branch}","tags_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/tags","blobs_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/statuses/{sha}","languages_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/languages","stargazers_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/stargazers","contributors_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/contributors","subscribers_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/subscribers","subscription_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/subscription","commits_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/issues/comments{/number}","contents_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/contents/{+path}","compare_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/merges","archive_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/downloads","issues_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/issues{/number}","pulls_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/pulls{/number}","milestones_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/milestones{/number}","notifications_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/labels{/name}","releases_url":"https://api.github.com/repos/rackerlabs/docs-developer-blog/releases{/id}","created_at":"2015-05-26T18:34:01Z","updated_at":"2015-11-05T01:08:02Z","pushed_at":"2015-12-16T18:26:25Z","git_url":"git://github.com/rackerlabs/docs-developer-blog.git","ssh_url":"git@github.com:rackerlabs/docs-developer-blog.git","clone_url":"https://github.com/rackerlabs/docs-developer-blog.git","svn_url":"https://github.com/rackerlabs/docs-developer-blog","homepage":null,"size":62032,"stargazers_count":7,"watchers_count":7,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":36,"mirror_url":null,"open_issues_count":10,"forks":36,"open_issues":10,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/docs-developer-blog/pulls/150"},"html":{"href":"https://github.com/rackerlabs/docs-developer-blog/pull/150"},"issue":{"href":"https://api.github.com/repos/rackerlabs/docs-developer-blog/issues/150"},"comments":{"href":"https://api.github.com/repos/rackerlabs/docs-developer-blog/issues/150/comments"},"review_comments":{"href":"https://api.github.com/repos/rackerlabs/docs-developer-blog/pulls/150/comments"},"review_comment":{"href":"https://api.github.com/repos/rackerlabs/docs-developer-blog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rackerlabs/docs-developer-blog/pulls/150/commits"},"statuses":{"href":"https://api.github.com/repos/rackerlabs/docs-developer-blog/statuses/dcf311e4de238151ba6e741485e07d59561c685e"}}}}