14

I have recently tried to pull and run a Docker image (that worked on Windows 10) on a Windows Server 2019 instance which failed with the following error message:

The container operating system does not match the host operating system.

I've tried it on the latest version of Windows Server Core and Nano Server from the normal microsoft/windowsservercore and microsoft/nanoserver repositories.

I don't understand because those are Windows Kernels running on a Windows Operating System.

Dandré
  • 2,053
  • 3
  • 18
  • 38
  • I am having exactly the same issue pulling the image `microsoft/mssql-server-windows-developer` in a Windows Server 2019 host. – nunopacheco Mar 26 '20 at 15:09

2 Answers2

3

Based on the feedback given on this github issue you have to pull the repository from Microsoft's new Container Registry (mcr.microsoft.com) for a specific version (1809). This version is compatible with Windows Server 2019.

docker pull mcr.microsoft.com/windows/servercore:1809

docker pull mcr.microsoft.com/windows/nanoserver:1809

Also beware that nanoserver no longer has Power-Shell in its base image.

As for why this is happening, I am not sure. Would appreciate if anyone could shed some light on the subject.

Community
  • 1
  • 1
Dandré
  • 2,053
  • 3
  • 18
  • 38
2

This error appears because Windows 10 and Windows Server have different Isolation Modes: Hyper-V Isolation for Win 10 and Process Isolation for Win Server. You can find more here

gurkan
  • 884
  • 4
  • 16
  • 25
  • Whereas it's useful to know about the different isolation modes, it does not seem to be the cause of this error. See https://support.codefresh.io/hc/en-us/articles/360016063140-Windows-The-container-operating-system-does-not-match-the-host-operating-system- – bgh Aug 02 '22 at 06:39