Learning Windows Server Containers
上QQ阅读APP看书,第一时间看更新

Preparing the development environment

In order to start creating Windows Containers, you need an instance of Windows Server 2016 or Windows 10 Enterprise/Professional edition (with Anniversary update). Irrespective of the environment, the PowerShell/Docker commands described in this chapter for creating and packaging containers/images are the same. If you already have the environment configured, you can directly skip to the Windows Server Containers development section. The following are the options we have for setting up a Windows Server Container development environment:

  • Windows 10: Using Windows 10 Enterprise or Professional edition with Anniversary update you can create Hyper-V Containers by enabling the containers role. Docker or PowerShell can be used to manage the containers. We will learn how to configure the Windows 10 environment in the following section.

Windows 10 only supports Hyper-V Containers created using nanoserver base OS image; it does not support Windows Server Containers.

  • Windows Server 2016: There are two options for working with containers on Windows Server 2016:
    • You can download the Windows Server 2016 ISO from here (https://www.microsoft.com/en-in/evalcenter/evaluate-windows-server-technical-preview) and install it on a VM running on Hyper-V or VirtualBox. For running Windows Server 2016 the host machine should have Hyper-V virtualization enabled. Additionally, for the containers to access the Internet, ensure that the network is sharable between the host and Hyper-V VMs.
    • Windows Azure provides a readymade instance of Windows Server 2016 with containers configured. This so far is the easiest option available.

In this chapter, I will be using Windows Server 2016 with containers enabled on Azure to create and manage Window Server Containers.