Windows Docker - Docker Image Preparation

Contents

In order to get docker container working, we need the base image for any customization or modification.

Firstly, get the WIM file ready: CBaseOs_th2_release_10514.0.150808–1529_amd64fre_ServerDatacenterCore_en-us.wim

Open up my favorite PowerShell ISE, check current Container status:

 1 2 3 4 5 6  #Check Current Container Get-Container #Check Current Container Image Get-ContainerImage #Check Container Host Get-ContainerHost 

As we can see, we got null value from the first two command due to we have nothing to run for Container, and following is the result for our Container HOST:

 1 2 3  Name ContainerImageRepositoryLocation ---- -------------------------------- DOCKER01-GUI C:\ProgramData\Microsoft\Windows\Hyper-V\Container Image Store 

Let’s check all cmdlet for Container in Windows:

 1  Get-Command *Container* 

There are 2 similar commands relates to create a new Container Image:

 1 2  Install-ContainerOSImage Import-ContainerImage 

By using “Get-Help”, we know that we should use “Install-ContainerOSImage” to Installs a base image from a WIM file into the shared central image store for the Windows Server and Hyper-V Containers feature.

So, we are running below:

 1  Install-ContainerOSImage -WimPath "C:\WIM\CBaseOs_th2_release_10514.0.150808-1529_amd64fre_ServerDatacenterCore_en-us.wim" 

Then we get following: It looks good, isn’t it?

A snapshot will be taken after this, because next step will be bit mass, if you want to try different things, you may want to do the same as me. :)