Following last week’s series on Container Hosts, This week I have decided to start a new series about how to deploy and manage Windows Containers using Docker.
In this article I’ll show you how I create a new Windows server Container using Docker, running Windows server Core Image.
If you haven’t created a Container Host yet, visit he Container Hosts page and setup one.
To create a Windows container open PowerShell or CMD and type:
Docker run --name -it windowsservercore cmd
The command will create a container with the name test01 and will start the container with the cmd command line tool.
As you can see the container Is running with the cmd tool
To exist the container and keep it running press the keys below at the same time
Ctrl + p + q
To view running and active containers type:
To view all containers type:
Docker ps -a
To connect to the running container type:
docker attach test01
To start PowerShell on the running container simply type PowerShell.