How to Run Windows Server 2016 Containers on Server 2019 Host

In this blog post, I will show you how to run Windows Server 2016 Containers on Windows Server 2019 Container host.

With the release of Windows Server 2019 Windows Containers, you might need to run previous Windows Server OS containers like Windows Server 2016.

If you try to run a Windows Server 2016 Container it will fail because the host OS is not the same as the Container OS.

Isolation

To fix the issue and run Windows Server 2016 Containers on my Host, I will use Hyper-V Isolation mode on my host.

In the example below, I will use the –isolation to run a Windows Server 2016 Core container

docker run -it --isolation=hyperv microsoft/windowsservercore cmd

If I run get-computerinfo from the Container you will see that the OS version is 2016

If I run the same cmdlet on my host you will see that it is running Windows Server 2019

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.