{"id":2036,"date":"2017-02-14T20:56:29","date_gmt":"2017-02-14T20:56:29","guid":{"rendered":"http:\/\/microsoftgeek.com\/?p=2036"},"modified":"2018-09-06T23:18:18","modified_gmt":"2018-09-06T23:18:18","slug":"configure-windows-server-containers-on-a-local-system","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=2036","title":{"rendered":"Configure Windows Server Containers on a Local System"},"content":{"rendered":"<p><iframe loading=\"lazy\" src=\"https:\/\/channel9.msdn.com\/Blogs\/containers\/Quick-Start-Configure-Windows-Server-Containers-on-a-Local-System\/player\" width=\"960\" height=\"540\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<h3>Setup\/Installation<\/h3>\n<p>Currently there are 3 ways that containers and be utilized.<\/p>\n<h3>Containers Host \u2013 Manual<\/h3>\n<p>To install the Containers feature manually is straight forward.<\/p>\n<ol>\n<li>Setup a Windows Server 2016 Technical Preview 3 installation<strong>NOTE:<\/strong> This does not necessarily mean that your physical host needs to be running Windows Server 2016 TP3. This post highlights TP3 running from a VM on a Windows Server 2012 R2 host. To add, the server (physical host or VM) is not required to be joined to a domain. This allows developers will be able to use containers for their development, running VMs on their own workstations.<\/li>\n<li>Launch the Add Roles and Features from Windows Server Manager<\/li>\n<li><\/li>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/i0.wp.com\/micloud.azurewebsites.net\/wp-content\/uploads\/2015\/09\/Add-Roles-and-Features.png?zoom=2&amp;resize=235%2C191\" alt=\"Add Roles and Features\" width=\"235\" height=\"191\" border=\"0\" \/><\/li>\n<li>Continue through the wizard until you get to the Features section<\/li>\n<li><\/li>\n<li>Find <strong>Containers<\/strong> and select it<\/li>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/i2.wp.com\/micloud.azurewebsites.net\/wp-content\/uploads\/2015\/09\/Features-Containers.png?zoom=2&amp;resize=603%2C427\" alt=\"Features - Containers\" width=\"603\" height=\"427\" border=\"0\" \/><\/li>\n<li>Continue to click Next, and complete the installation of this feature<\/li>\n<li>Restart the server after the feature is installed<\/li>\n<li>Check to ensure the feature has been installed by running the following PowerShell command: <strong>Get-Command -Module Containers<\/strong> to see all of the commands available<\/li>\n<li><\/li>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/i0.wp.com\/micloud.azurewebsites.net\/wp-content\/uploads\/2015\/09\/Container-PowerShell-Commands.png?zoom=2&amp;resize=603%2C299\" alt=\"Container PowerShell Commands\" width=\"603\" height=\"299\" border=\"0\" \/><\/li>\n<\/ol>\n<p>Now that the Containers server feature has been installed, a Container OS Base Image is needed to work with. Microsoft has provided a PowerShell scriptto help get this setup for you.<\/p>\n<p><strong>NOTE:<\/strong>The Container Host will require Internet access for this script to work correctly, as it downloads the Container OS Base Image from Microsoft\u2019s repository.<\/p>\n<p>Notice that the script shows \u201cFeature Containers is already enabled\u201d because we already did that part our selves. But there is a bunch of other stuff that it does for us (i.e. container networking, container OS image, Docker, etc.).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/i1.wp.com\/micloud.azurewebsites.net\/wp-content\/uploads\/2015\/09\/ContainerSetup-Script-Complete.png?zoom=2&amp;resize=603%2C251\" alt=\"ContainerSetup Script Complete\" width=\"603\" height=\"251\" border=\"0\" \/><\/p>\n<p>If you follow this process, you will end up with a Container Host, but running on GUI-enabled system. As apposed to use the full-PowerShell method (described in the next section), which results in a Server Core OS installation.<\/p>\n<h3>Containers Host \u2013 PowerShell<\/h3>\n<p>The PowerShell script provided by Microsoft to setup a Container Host quickly should the manual method not be desirable.<\/p>\n<ol>\n<li>On your host launch an Administrative PowerShell console<\/li>\n<li>Run the following PowerShell command: wget -uri https:\/\/aka.ms\/newcontainerhost -OutFile New-ContainerHost.ps1<strong>NOTE:<\/strong> This PowerShell script is different than the one mentioned in the previous section. This one will create a Virtual Machine, complete with Windows Server 2016 TP3 Core, and configured with the Containers feature; hence the <em>Host<\/em> part in the script name.<\/li>\n<li>Once the Container Host script is downloaded, run the following command to start the automated build\/deploy of the Container Host VM.\\New-ContainerHost.ps1 \u2013VmName &lt;containerhost&gt; -Password &lt;password&gt;<\/li>\n<li>Type <strong>y<\/strong> (for Yes) and then hit enter when the warning is encountered<\/li>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/i1.wp.com\/micloud.azurewebsites.net\/wp-content\/uploads\/2015\/09\/PowerShell-Command-Prompt.png?zoom=2&amp;resize=603%2C143\" alt=\"PowerShell Command Prompt\" width=\"603\" height=\"143\" border=\"0\" \/><\/li>\n<li><strong>NOTE:<\/strong> The process shows that the file is 6 GB in size as of the time of this writing.<\/li>\n<li><\/li>\n<li>The rest of the configuration will begin automatically once the download completes<\/li>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/i1.wp.com\/micloud.azurewebsites.net\/wp-content\/uploads\/2015\/09\/ContainerHost-Script-Complete.png?zoom=2&amp;resize=603%2C368\" alt=\"ContainerHost Script Complete\" width=\"603\" height=\"368\" border=\"0\" \/><\/li>\n<li>Once completed, connect to the newly created Container Host via the password supplied at the beginning of the process<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/i2.wp.com\/micloud.azurewebsites.net\/wp-content\/uploads\/2015\/09\/ContainerHost-PS-Login.png?zoom=2&amp;resize=603%2C316\" alt=\"ContainerHost-PS Login\" width=\"603\" height=\"316\" border=\"0\" \/><\/li>\n<li>Launch PowerShell and use the Get-WindowsFeature command to notice some features that are marked as <strong><strong>Removed<\/strong><\/strong><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/i2.wp.com\/micloud.azurewebsites.net\/wp-content\/uploads\/2015\/09\/ContainerHost-PS-Removed-Features.png?zoom=2&amp;resize=603%2C316\" alt=\"ContainerHost-PS - Removed Features\" width=\"603\" height=\"316\" border=\"0\" \/><\/li>\n<li><strong>NOTE:<\/strong> The <strong>User Interface and Infrastructure<\/strong> components are also removed. Follow the manual process above should there be a requirement for a GUI for your Container Host<\/li>\n<li><\/li>\n<li><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/i0.wp.com\/micloud.azurewebsites.net\/wp-content\/uploads\/2015\/09\/ContainerHost-PS-Removed-Features-User-Interface.png?zoom=2&amp;resize=603%2C318\" alt=\"ContainerHost-PS - Removed Features - User Interface\" width=\"603\" height=\"318\" border=\"0\" \/><\/li>\n<\/ol>\n<h3>Containers Host \u2013 Azure<\/h3>\n<p>The third method involves the setup of a Container Host in Azure.<\/p>\n<p>Microsoft already offers a Gallery Image specific to Container Hosts and has provided a detailed overview as to how to enable it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Setup\/Installation Currently there are 3 ways that containers and be utilized. Containers Host \u2013 Manual To install the Containers feature manually is straight forward. Setup a Windows Server 2016 Technical Preview 3 installationNOTE: This does not necessarily mean that your physical host needs to be running Windows Server 2016 TP3. This post highlights TP3 running [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[67,48,63],"tags":[],"class_list":["post-2036","post","type-post","status-publish","format-standard","hentry","category-windows-containers-containers","category-microsoft-windows-server-2012","category-server-2016-2016"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2036","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2036"}],"version-history":[{"count":6,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2036\/revisions"}],"predecessor-version":[{"id":2042,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2036\/revisions\/2042"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2036"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}