<commit_before># Container Requirements and Deployment

The Windows Container feature is on only available with Windows Server 2016 (Full, Core, and Nano Server). Within the Windows Container feature is two different container types, each with slightly different behavior and requirements. The two container types are:

- Windows Server Containers –provide application isolation through namespace and process isolation.
- Hyper-V Containers – provide application isolation through hosting the container in a super optimized virtual machine. Hyper-V Containers require Hyper-V to be installed on the containers host.

Both container types use a container OS Image during container deployment. A Base OS Image provides the foundational container configuration. At the time of Windows Server Technical Preview 4, two base OD images are available, Windows Server Core and Nano Server. Also at the TP4 release there are limitations between container host, container type, and OS Image compatibility. The following table describes the supported configuration.

<table border="1" style="background-color:FFFFCC;border-collapse:collapse;border:1px solid FFCC00;color:000000;width:90%" cellpadding="5" cellspacing="5">
<tr valign="top">
<td><center>**Host Operating System**</center></td>
<td><center>**Windows Server Container**</center></td>
<td><center>**Hyper-V Contianer**</center></td>
<tr>
<tr valign="top">
<td><center>Windows Server 2016 Full UI</center></td>
<td><center>Core OS Image</center></td>
<td><center>Nano OS Image</center></td>
<tr>
<tr valign="top">
<td><center>Windows Server 2016 Core</center></td>
<td><center>Core OS Image</center></td>
<td><center> Nano OS Image</center></td>
<tr>
<tr valign="top">
<td><center>Windows Server 2016 Nano</center></td>
<td><center> Nano OS Image</center></td>
<td><center>Nano OS Image</center></td>
<tr>
</table>


## Container Deployment Checklist

<table border="1" style="background-color:FFFFCC;border-collapse:collapse;border:1px solid FFCC00;color:000000;width:90%" cellpadding="8" cellspacing="3">
<tr valign="top">
<td width="200"><center>**Action**</center></td>
<td><center>**Information**</center></td>
<tr>

<tr valign="top">
<td><center>Install Container Feature</center></td>
<td>The container feature needs to be installed in order to create and manage containers. This feature also installs the container PowerShell module.<br /><br />
<ul><li>[Windows Server](#role) - install container role on Windows Server and Window Server Core.</li>
<li>[Nano Server](#nano) - prepare a Nano Server image with the container feature.</li>
<ul>
</td>
<tr>

<tr valign="top">
<td><center>Configure Hyper-V Role</center></td>
<td>The Hyper-V role is required if the container host will be running Hyper-V container.<br /><br />
<ul><li>[Enable Nested Virtualization](#nest) – if the container host is running on a Hyper-V virtual machine.</li>
<li>[Install Hyper-V Role](#hypv) - on Windows Server and Windows Server Core.</li>
<li>[Nano Server](#nano) - Hyper-V is installed when creating the Nano Server Image.</li>
</ul>
</td>
<tr>
	
<tr valign="top">
<td><center>Install OS Images</center></td>
<td>OS images provide the base for all Windows Containers. OS images have been created with both Windows Server Core and Nano Server. The installation of OS images is identical for Windows Server and Nano Server.<br /><br />
<ul><li>[Install OS Images](#img)</li><ul>
</td>
<tr>

<tr valign="top">
<td><center>Configure Networking</center></td>
<td>The following networking items are required for Windows Containers.<br /><br />
<ul><li>[Create Virtual Switch](#vswitch) - Each container is connected to a virtual switch for all network communication. The virtual switch is configured as either external or NAT.
<li>[Configure Network Address Translation (NAT)](#nat) - If a virtual switch has been configured as type NAT, a NAT object will need to be created.
<li>[Enable MAC Spoofing](#mac) – if the container host is a Hyper-V virtual machine, MAC spoofing will need to be enabled.
</ul>
</td>
<tr>

<tr valign="top">
<td><center>Install Docker</center></td>
<td>The Docker daemon and CLI will need to be installed if Docker will be used as the container management tool.<br /><br />
<ul><li>[Install Docker](#docker)</li></ul>
</td>
<tr>

</table>

### <a name=role></a>Install Container Feature

The container feature can be installed on Windows Server 2016 or Windows Server 2016 Core, using Windows Server Manager or PowerShell.

To install the role using PowerShell, run the following command in an elevated PowerShell session.

```powershell
Install-WindowsFeature containers
```
The system will need to be rebooted when the container role installation has completed.

```powershell
shutdown /r 
```

After the system has rebooted, use the `Get-ContainerHost` command to verify that the container role has successfully been installed:
<commit_msg>updates<commit_after># Container Requirements and Deployment

The Windows Container feature is on only available with Windows Server 2016 (Full, Core, and Nano Server). Within the Windows Container feature is two different container types, each with slightly different behavior and requirements. The two container types are:

- Windows Server Containers –provide application isolation through namespace and process isolation.
- Hyper-V Containers – provide application isolation through hosting the container in a super optimized virtual machine. Hyper-V Containers require Hyper-V to be installed on the containers host.

Both container types use a container OS Image during container deployment. A Base OS Image provides the foundational container configuration. At the time of Windows Server Technical Preview 4, two base OD images are available, Windows Server Core and Nano Server. Also at the TP4 release there are limitations between container host, container type, and OS Image compatibility. The following table describes the supported configuration.

<table border="1" style="background-color:FFFFCC;border-collapse:collapse;border:1px solid FFCC00;color:000000;width:90%" cellpadding="5" cellspacing="5">
<tr valign="top">
<td><center>**Host Operating System**</center></td>
<td><center>**Windows Server Container**</center></td>
<td><center>**Hyper-V Contianer**</center></td>
<tr>
<tr valign="top">
<td><center>Windows Server 2016 Full UI</center></td>
<td><center>Core OS Image</center></td>
<td><center>Nano OS Image</center></td>
<tr>
<tr valign="top">
<td><center>Windows Server 2016 Core</center></td>
<td><center>Core OS Image</center></td>
<td><center> Nano OS Image</center></td>
<tr>
<tr valign="top">
<td><center>Windows Server 2016 Nano</center></td>
<td><center> Nano OS Image</center></td>
<td><center>Nano OS Image</center></td>
<tr>
</table>


## Container Deployment Checklist

<table border="1" style="background-color:FFFFCC;border-collapse:collapse;border:1px solid FFCC00;color:000000;width:90%" cellpadding="8" cellspacing="3">
<tr valign="top">
<td width="200"><center>**Action**</center></td>
<td><center>**Information**</center></td>
<tr>

<tr valign="top">
<td><center>Install Container Feature</center></td>
<td>The container feature needs to be installed in order to create and manage containers. This feature also installs the container PowerShell module.<br /><br />
<ul><li>[Windows Server](#role)</li>
<li>[Nano Server](#nano)</li>
<ul>
</td>
<tr>

<tr valign="top">
<td><center>Configure Hyper-V Role</center></td>
<td>The Hyper-V role is required if the container host will be running Hyper-V container.<br /><br />
<ul><li>[Enable Nested Virtualization if container host is a VM]](#nest)</li>
<li>[Windows Server](#hypv)</li>
<li>[Nano Server](#nano)</li>
</ul>
</td>
<tr>
	
<tr valign="top">
<td><center>Install OS Images</center></td>
<td>OS images provide the base for all Windows Containers. OS images have been created with both Windows Server Core and Nano Server. The installation of OS images is identical for Windows Server and Nano Server.<br /><br />
<ul><li>[Install OS Images](#img)</li><ul>
</td>
<tr>

<tr valign="top">
<td><center>Configure Networking</center></td>
<td>The following networking items are required for Windows Containers.<br /><br />
<ul><li>[Create Virtual Switch](#vswitch)
<li>[Configure Network Address Translation (NAT)](#nat)
<li>[Enable MAC Spoofing if container host is a VM](#mac)
</ul>
</td>
<tr>

<tr valign="top">
<td><center>Install Docker</center></td>
<td>The Docker daemon and CLI will need to be installed if Docker will be used as the container management tool.<br /><br />
<ul><li>[Install Docker](#docker)</li></ul>
</td>
<tr>

</table>

### <a name=role></a>Install Container Feature

The container feature can be installed on Windows Server 2016 or Windows Server 2016 Core, using Windows Server Manager or PowerShell.

To install the role using PowerShell, run the following command in an elevated PowerShell session.

```powershell
Install-WindowsFeature containers
```
The system will need to be rebooted when the container role installation has completed.

```powershell
shutdown /r 
```

After the system has rebooted, use the `Get-ContainerHost` command to verify that the container role has successfully been installed:

{'fraction_non_alphanumeric': 0.1303594629709831, 'fraction_numerical': 0.01234300563014292, 'mean_word_length': 5.806927044952101, 'pattern_counts': {'":': 0, '<': 301, '<?xml version=': 0, '>': 301, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '11939', 'n_tokens_mistral': 2759, 'n_tokens_neox': 2500, 'n_words': 1061}