a couple weeks ago i was delivering a session on Windows Server 2016. During that session i covered the Container support in Windows Server 2016. I see huge possibilities with containers. I’m far from a Docker expert but I’m diving head first in that pool.
Anyway, like i was saying i covered the support for containers in WS2016. Well a few day later one of the attendees reached out and said “this think is busted!” with the two screenshots below. “I installed the container feature, i rebooted and tried to load a sample container. The darn thing is busted….”
So, those were my marching orders.
- Figure it out
- write about it…
so here we are:
Step 1- Install the container support.
Todo so, we’ll use the OneGet provider PowerShell module. The provider will enable the containers feature on your machine ( the same as if you’d use the GUI to Install the feature) and prep for the install of Docker
The Container Feature is to enable this. but you still need to install Docker itself ( that includes Docker Engine and the Docker client.) It is required in order to work with Windows containers.
Open an elevated PowerShell session and run the following commands to install the OneGet PowerShell module.
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
Next we will install the latest version of Docker using the following command. when prompted to tell you that the source is untrusted and whether or not you want to continue. type “A” to continue.
Install-Package -Name docker -ProviderName DockerMsftProvider
When the installation is complete, reboot the computer using this powershell command.
Step 2: Test our Docker support by running a test container from Docker Hub.
In this step we will download and run a pre-created .NET sample image from the Docker Hub registry. The container will run a .Net Hello World application and shut itself down .
docker run microsoft/sample-dotnet
That’s it! you now have Container/Docker support.
I hope this helps,