Docker Community Forums

Share and learn in the Docker community.

Mismatching os-versions

Hi, new to Docker here :slight_smile:

I’ve created a DockerImage locally on my computer (windows 10) and pushed it to DockerHub.

Have then tried to pull it from DockerHub to another machine(remote) with Windows Server OS, both 2016 and 2019. The pull results in the following failure message.

“a Windows version 10.0.19XXX-based image is incompatible with a 10.0.14XXX host”

How do I build an image local via CLI that has the specific build that the host requires? Ex. docker build -t buildWithHostVersion .

Or how do I set up my DockerFile to do so? When using FROM servercore:1607 (which should be compatible with windows server 2019 os) I can’t run dotnet commands like “dotnet restore”, so is there an altenate syntax more suited for the build version I’m trying to create my image from?

(Don’t want to upgrade host-OS due to some specific reasons)