Implement Windows containers
- 10/6/2017
Chapter summary
Containers are based on images. You create a container by running an image, and you create an image by saving the contents of a container.
Windows Server 2016 includes the Containers feature, which provides the support environment for the Docker platform.
Both the Server Core and Nano Server installation options support the creation of Windows Server and Hyper-V containers. In Nano Server, you can run the Docker.exe client on a remote system.
Docker is an open source container solution that consists of two files: Dockerd.exe, which is the engine that runs as a service on Windows, and Docker.exe, which is the command line client that controls the Dockerd engine.
Using a text file called daemon.json, you can configure start-up options for the Dockerd engine.
The Docker client is one way to control the Docker engine, but it is not the only way. You can also use the Docker module for Windows PowerShell to perform the same tasks.
To download images from the Docker Hub, you use the Docker Pull command.
Tags are version indicators that developers can use to track the builds or versions of a container image. To assign tag values, you use the Docker Tag command.
To uninstall a container image, you use the Docker RMI command.
To create a Windows Server container, you use the Docker Run command, specifying the name of a container image.
The procedure for creating a Hyper-V container using Docker differs from a Windows Server container only in the inclusion of the --isolation parameter.
The Docker.exe client enables you to control containers by starting, stopping, saving, and removing them.
The Docker module for Windows PowerShell provides an alternative to the Docker.exe client that can perform most, if not all, of the same functions.
By default, Docker uses network address translation to provide containers with network access. However, you can override the default and configure containers to be part of your larger network.
Docker enables you to create data volumes that exist on the container host and add them to a container. Data volumes remain in place, even if you remove the container itself.
Using parameters on the Docker Run command line, you can limit the amount of memory and CPU resources a container is permitted to use.
A dockerfile is a script that contains instructions for building a new container image. You use the Docker Build command to execute the script and create the image.
Docker Hub is a free repository, based in the cloud, on which you can upload your
Microsoft Azure enables you to create virtual machines that you can use as container hosts.