What Are Windows Server Containers?
Virtualization drastically changed the way that IT operated in organizations of all sizes, but containers
have had a large impact as well. You may be wondering why someone would want to use containers in Windows
Server 2019. They're just virtual machines (VMs), right? Well, not exactly.
The technologies may seem similar, but containers and VMs are not the same. VMs are presenting virtual
hardware to the user. Containers don't expose the hardware or the operating system; they're meant to run
applications in isolation.
VMs can be thought of as Infrastructure as a Service (IaaS). Although VMs do present virtual hardware
to system administrators, the administrators of virtual servers don't have to be concerned about the
underlying hardware. They can focus on the operating system and applications that they're responsible for.
Containers take this idea and refine it to where each container is responsible for running an application.
The application is baked into the image so the containers can be stood up and torn down constantly. This is
great for Platform as a Service (PaaS) scenarios where developers just want to test their code and not worry
about getting servers provisioned to test against. Developers don't generally care about hardware or
operating systems; they just want to know that their code works in the way they expect it to.
The main idea behind containers is that the application inside of each container has all the resources
that it requires to function within the same container. This means that you can drop the container on any
container host, and all the application's requirements will still be met because those requirements (.NET,
for example) move with the application inside the container.
What a container looks like in Windows Server 2019
You may be wondering what containers look like. Let's use the example of containers in Windows specifically.
At a high level, the architecture looks something like this figure.
Container architecture on Windows Server involves several layers and utilizes the Docker Engine to work with containers.
In a Windows Server operating system, after you enable the containers feature, you install the Docker
Engine. The Docker Engine is responsible for packaging and deploying the containers. Microsoft partnered
with Docker for the first time with Windows Server 2016 to support running containers on a Windows operating system.
Important container terms
As with most newer technologies, there are new terms that you need to understand to be on the same page
as other system administrators who work with containers. Here are the most important terms:
• Container host: The container host is the system that is configured with the Windows
Container feature. It can be a physical host or, through the joys of nested virtualization, a virtual
host. All the containers on the container host share the host's resources.
• Container image: When you create a container image, you create a deployable image that
contains the changes you made to the original image, which were stored in the sandbox. The container image
does not contain the operating system (OS); instead, when you deploy custom container images, they're a
layer of customization that is added on top of the container OS image.
• Sandbox: The sandbox saves changes as they're made to the container image. This can
include modifications to the file system and Registry, and any new applications you might install. Changes
saved in the sandbox can be saved as container images so they can be reused.