Docker for Windows
Refer to the book from Packt, Docker on Windows, Second Edition by Elton Stoneman, who says "My goal is for this to be the definitive book about Docker on Windows, so I've covered everything from a 101 on containers, through modernizing .NET apps with Docker and the security implications of containers, to CI/CD and administration in production. The book ends with a guide to moving forward with Docker in your own projects."
https://docs.docker.com/docker-for-windows/
Workflow anticipated
- Develop on Windows 10
- Move container to Windows Server 2019
Windows 10
Download and install Docker Desktop for Windows. (Be prepared; this requires a logout and a reboot!)
Try Docker Desktop for Windows Tick the box "Use Windows containers instead of Linux containers (this can be changed after installation)".
This installs Kitematic, which runs as a service (lower right corner look for the Docker whale)
In Kitematic, turn on experimental features under Settings->Daemon. This worksaround a glitch, which manifests on builds as "no matching manifest for windows/amd64 10.0.18362 in the manifest list entries"
First things first in a bash shell I try
winpty docker run -it --rm hello-world
and it works, suggesting that I try this
winpty docker run -it mcr.microsoft.com/windows/servercore powershell
which failed with
C:/Program Files/Docker/Docker/Resources/bin/docker.exe: Error response from daemon: manifest for mcr.microsoft.com/windows/servercore:latest not found: manifest unknown: manifest unknown. See 'C:/Program Files/Docker/Docker/Resources/bin/docker.exe run --help'.
but adding the 1903 tag worked (after downloading the big bulky (about 2GB) servercore images (it's from Microsoft so it has to be big))
winpty docker run -it mcr.microsoft.com/windows/servercore:1903 powershell . . Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. Try the new cross-platform PowerShell https://aka.ms/pscore6 PS C:\>
Awesome progress! Woot! I am going to jump down to Windows Server section now to run the same steps there, because if I can't run Docker on Server then it's useless to me.
Note on running Linux containers on Windows
If you run a Linux container on a Windows machine you will be running a Linux virtual machine to host the Docker container(s) and that will be a heavier load on the server and also have resource limits (in particular, RAM will be capped by the Linux VM).
You can switch anytime if you for example want to run a test locally before deploying to a Linux server. In Kitematic it's an option "Switch to Linux containers..."
Windows Server 2019
Not there yet... come back later today.