Containers - jasper-zanjani/Windows-Server GitHub Wiki

Container deployment

Containers run applications in an isolated namespace, meaning it only has access to resources that are made available to it by the container runtime. Resource governance means that a container has access only to a specified number of processor cycles, system memory, and other resources. Containers allow applications to be packaged with their dependencies in container images, which will run the same regardless of underlying operating system or infrastructure and are downloaded from container registries like Docker Hub. Container registries are not to be confused with repositories, which are subcomponents of registries. Windows Server 2016 suports Windows Server Containers and Hyper-V Containers, which create a separate copy of the operating system kernel for each container.

The "Containers" feature must be installed on Windows Server 2016 hosts, and to create Hyper-V containers the Hyper-V role must also be installed (although the Hyper-V management tools are not necessary if VMs are not going to created). Windows container hosts need to have Windows installed to C:.

Nano Server once could serve as Docker hosts, but no longer; Nano Servers are now intended to be deployed as containers themselves. The Powershell Docker module has been deprecated for years.

Container management

Docker has several options for containers to store files in a persistent manner:

  • Volumes are stored in a part of the host filesystem which is managed by Docker (/var/lib/docker/volumes/ on Docker).
  • Bind mounts may be stored anywhere on the host system and are specified by [docker run --volume][docker run -v].
  • tmpfs mounts are stored in the host system's memory only, and are available only on Linux.