Adding container OS images in Windows Server 2016

Adding container OS images in Windows Server 2016

Q. I have deployed Containers to my host but I only have one OS image, how can I get more?

A. When the containers feature is installed in Windows Server 2016 by default it installs a single image depending on the configuration level of the container host and if Hyper-V containers are enabled. For example the following installs the container feature with Hyper-V enabled:

wget -uri https://aka.ms/tp4/Install-ContainerHost -OutFile C:\Install-ContainerHost.ps1
C:\Install-ContainerHost.ps1 -HyperV

Once installed the images can be viewed using Get-ContainerImage. Only the Nano server image was installed however I also wanted the Server Core image. To install I simply listed the available images then fetched the server core image.

Find-ContainerImage
Install-ContainerImage -Name WindowsServerCore

To make the image also available via Docker management I restarted the Docker daemon.

Stop-Service -Name Docker
Start-Service -Name Docker

The images then show via the command:

docker images

Each week, John Savill answers all of your toughest tech questions about the worlds of Windows Server, Azure, and beyond. Read his past IT advice here, and email your questions to john@savilltech.com.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish