This is just a summary of my recent research on this topic.
as March, 2019…
Getting Linux containers to run on a Windows (server) is slightly more involved and much more interesting though. Keep reading 🙂
Using Docker Desktop for Windows to run containers (windows and linux) is by far the easiest solution BUT, it is only officially supported on Windows 10 64bit: Pro, Enterprise or Education (1607 Anniversary Update, Build 14393 or later). You may be able to get it to run on a Windows Server but shouldn’t use it on a “production environment” – the CE version is not officially supported on windows server and each release is only supported for 4 months.
There is an effort to bring Linux containers to Windows (LCoW) but as now it is not yet ready for prime time. It is promising and will allow you to run Windows and Linux containers side-by-side using Hyper-V isolation – read more on Microsoft’s web site.
In the meanwhile…
The best option that I found, to run Linux containers on a Windows Server, is to use the same approach used by Docker Desktop for Windows – run a Linux Virtual machine on Hyper-V. A similar approach is used on MacOS.
Docker Machine is a tool that lets you install Docker Engine on virtual hosts, and manage the hosts withhttps://docs.docker.com/machine/overview/
docker-machinecommands. You can use Machine to create Docker hosts on your local Mac or Windows box, on your company network, in your data center, or on cloud providers like Azure, AWS, or Digital Ocean.
Docker Machine is a standalone tool that can be used to create (linux) virtual machines optimized to run containers on all sorts of virtualization and OSes. Docker Machine is also included in Docker for Mac, Docker for Windows, or Docker Toolbox but you can just download it by itself.
Docker machine by default will use boot2docker to create the virtual machine.
Boot2Docker is a lightweight Linux distribution made specifically to run Docker containers. It runs completely from RAM, is a ~45MB download and boots quickly.https://github.com/boot2docker/boot2docker
Unfortunately, boot2docker has been deprecated and is not recommended for production environments.
Boot2Docker is officially in maintenance mode — it is recommended that users transition from Boot2Docker over to Docker for Mac or Docker for Windows instead.https://github.com/boot2docker/boot2docker
But we have an alternative! RancherOS!
RancherOS is the smallest, easiest way to run Docker in production. Every process in RancherOS is a container managed by Docker.https://rancher.com/docs/os/v1.x/en/
Docker Machine supports creating a RancherOS virtual machine out of the box.
On a Windows Server version with Hyper-v support this is probably, right now, the best option to run linux containers on it.
RancherOS virtual machines can be used when installed and will have new releases to address security issues.
You can find all the steps to get it running on this other post.