Hands on with Windows Server 2016 Containers
Containers, Docker support are big new features, but the current preview is rough
In order to try Windows Server Containers, you do not necessarily need to install Windows Server 2016 directly.
If you do, you can enable the Containers feature, but that is not enough to get going. Microsoft has a PowerShell script you need to run before it is usable. One of the tasks included in the script is to download a suitable OS image to use as the base for further images.
This did work, and I was able to create a container with Microsoft’s PowerShell library and connect to it using Remote Desktop Connection. I ran up Task Manager on both the container and the host. Both instances of Task Manager report the same CPU and memory usage, but the container can only see (in this case) 28 processes versus 77 processes visible on the host. This illustrates how much more sharing is going on that with full VMs.
Task Manager on a container and on its host
Currently each container has its own unique view of the C drive, but other drives are automatically mapped in, making isolation rather weak in this preview, but this will change.
Microsoft’s tutorials are based on the open source Nginx web server, but I was also able to install IIS and browse to a web site running on a container.
IIS running on a Windows Server container
Another approach, rather than installing Server 2016 first, is to start in Windows 10 and run a PowerShell script to download a VM which is pre-configured with a Core edition of Server 2016 and Docker. This is the easiest way to try Microsoft’s Docker port, though you can also build it yourself using the official fork
While the Docker walkthrough also worked, I experienced more unexpected behavior with Docker than with PowerShell.
Microsoft is playing catch-up here, but container support in Windows Server is still a big deal and promises to make application deployment smoother and more reliable than is currently the case. In the course of this review, installing the Docker Tools for Visual Studio broke ASP.NET broke Visual Studio 2015 beyond easy repair on one machine, illustrating how easily the dependency dance can cause problems.
Server deployments tend to be easier to manage, but better still is to build an application and deploy it in what is in effect its own dedicated and customised VM, and if anything goes wrong in production, simply to delete it and redeploy.
Container technology also enables easy deployment of multiple application instances, or applications composed of multiple services, and orchestration of these deployments using suitable tools.
Docker support will also make deploying to Windows an easier transition for developers used to Linux environments. It is worth nothing though that Docker was born on Linux and Microsoft has some challenges in porting it to Windows.
While it already works, it would not be surprising if using PowerShell turns out to be a more robust solution when Windows Server containers are released.®