In this article I’ll show you how I create a Container Host running Windows Containers using Docker on Hyper-V.
This article will utilize all the latest technologies I have been covering In last few months like:
Windows Server 2016, Nano Server, Docker, Windows Containers and Hyper-V.
In order to completed this successfully I’m using an TP5 Server with Hyper-V , Nested virtualization and TP5 VM as a Container Host.
To get started, from your Container Host Install Hyper-V
Get-windowsfeature hype* | install-windowsfeature
Next Install Windows Containers role:
Install-windowsfeature containers
Install package provier In order to be able to download Containers Images
Install-packegeprovider containerimage -force
Find-containerimage
Install Windows Server 2016 Core Image.
Note: You can’t run Nano Server Container on a Windows Server 2016 Container Host.
To run Nano Server as Container you will need to run Nano Server as the container host which I’ll soon.
Install-containerimage -name WindowsServerCore
To confirm that the Installation Is successful run:
Get-containerimage
Docker Install
To Install Docker run:
Invoke-WebRequest https://aka.ms/tp5/Update-Container-Host -OutFile update-containerhost.ps1
.\update-containerhost.ps1
Next we need to Tag out Docker Image to be the latest using the line below (make sure you change the Image ID)
Docker images
Docker tag 7e15f95e69f7 windowsservercore:latest
Run Windows Container
Docker run -it windossservercore cmd