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.
• Container OS image: Not to be confused with the container image, the container OS image can't be modified. It is the first layer in the container sandwich and provides the operating system that the container will use.
• Container repository: Container images along with any dependencies they may have are stored in a container repository so that they can be reused. They can be stored in a local repository, or if you plan on using the image across multiple container hosts, you can create private or public repositories on Docker Hub. Repositories may also be referred to as registries; Docker Hub, for instance, is often referred to as a container registry.
How containers run on Windows Server 2019
Containers use the Docker Engine to run on Windows Server. Containers were first introduced in Windows Server 2016, but the technology and, of course, Docker itself have been around a lot longer than that.
Docker is the engine that is responsible for packaging and delivering container images. Those container images can be based on Windows or Linux operating systems and can run in your datacenter and Windows Server 2019.
This is an excerpt from:
Your one-stop reference for Windows Server 2019 and PowerShell know-how
Windows Server 2019 & PowerShell All-in-One For Dummies offers a single reference to help you build and expand your knowledge of all things Windows Server, including the all-important PowerShell framework. Written by an information security pro and professor who trains aspiring system administrators, this book covers the broad range of topics a system administrator needs to know to run Windows Server 2019, including how to install, configure, and secure a system. This book includes coverage of:
• Installing & Setting Up Windows Server
• Configuring Windows Server 2019
• Administering Windows Server 2019
• Configuring Networking
• Managing Security
• Working with Windows PowerShell
• Installing and Administering Hyper-V
• Installing, Configuring, and Using Containers
If you're a budding or experienced system administrator looking to build or expand your knowledge of Windows Server, this book has you covered. Click here for more information.
More Windows Administration Information:
• Windows Server 2003 Active Directory and Network Infrastructure
• How to Configure Hyper-V on Windows Server 2019
• Disable Indexing to Speed Up Your Computer
• Restrict Web Browsing With Internet Explorer
• PC Technician's Guide to Providing Telephone Support
• Configuring Windows as a NTP (Network Time Protocol) Server
• A Day in the Life of a System Administrator
• Retrieving Information from Computers Belonging to an Active Directory OU
• Top Ten RAID Tips
• Basic Functions of Microsoft Active Directory