Running Windows containers
As already hinted at in the first part of this chapter, launching and interacting with Windows containers using the Docker command-line client is no different from what we have been running so far. Let’s test this by running the hello-world
container, as follows:
$ docker container run hello-world
Just as before, this will download the hello-world
container and return a message, as illustrated in the following screenshot:
The only difference on this occasion is that rather than the Linux image, Docker pulled the windows-amd64
version of the image that is based on the nanoserver-sac2016
image.
Now, let’s look at running a container in the foreground, this time running PowerShell, as follows:
$ docker pull mcr.microsoft.com/windows/servercore $ docker container run -it mcr.microsoft.com/windows/servercore:ltsc2019 powershell
Once your...