Base Docker Images and Compatibility with Operating System like Windows 2019 Server

I have a couple of apps that will build images on a windows 2016 server fine and the containers run fine.

the base image was

FROM microsoft/dotnet:2.2-aspnetcore-runtime-nanoserver-sac2016 AS base

We are moving to the Windows 2019 Server platform and with the above we get this error during a docker build. Not docker run

hcsshim::CreateComputeSystem 772c3cc7bab1c345df6e4643ef8ea304b8141fbaf8c861dd0d4e89eef46f3efb: The container operating system does not match the host operating system.

I went back to Visual Studio and regenerated the Dockerfile on the 2019 Server and this time it had

FROM microsoft/dotnet:2.2-aspnetcore-runtime-nanoserver-1803 AS base

however this still throws an error with all the details listed below.

hcsshim::CreateComputeSystem 8ff71c6c3851f999d5a34f674e5e099160fe6aa47d3368afee8b9368d5b7c441: The container operating system does not match the host operating system.
(extra info: {“SystemType”:“Container”,“Name”:“8ff71c6c3851f999d5a34f674e5e099160fe6aa47d3368afee8b9368d5b7c441”,“Owner”:“docker”,“VolumePath”:“\\?\Volume{b190a7e8-0b06-494b-9949-a94760eb844b}”,“IgnoreFlushesDuringBoot”:true,“LayerFolderPath”:“E:\docker_data\windowsfilter\8ff71c6c3851f999d5a34f674e5e099160fe6aa47d3368afee8b9368d5b7c441”,“Layers”:[{“ID”:“e10bde2c-cced-52b6-b09f-97c4f4832909”,“Path”:“E:\docker_data\windowsfilter\5d5636b65cc02162aa6fc5097d786e652c55c4795c20365f218b83a4dbe58885”},{“ID”:“e39b408a-f3a5-55fb-9f0a-8bbf2d3d152e”,“Path”:“E:\docker_data\windowsfilter\74a85366b4297bfb49ae74c57b597deaa222f544f15051b749e358bbb2b824dd”},{“ID”:“7bce31a8-f8b5-52ce-9333-0d45e1333ccf”,“Path”:“E:\docker_data\windowsfilter\5f84cac9c2f9106d4f5f3af1c1ee5473cbfc4e899cef22649cba309bb0d40915”},{“ID”:“28627313-74b9-5fe8-8307-998be4821f40”,“Path”:“E:\docker_data\windowsfilter\f874839512034b2a4e2459745f61c560ba12abf113537bb785d83a947bfaa8db”},{“ID”:“201494b2-4bb2-5f29-a10c-8843875cf8ac”,“Path”:“E:\docker_data\windowsfilter\6d24b44f66c36e7ab84df12db52b2bd7eb383eec5bfc7bc02f21d881f4faf1fa”},{“ID”:“de1873ce-f89c-5e16-a3cc-3b3df57c8b97”,“Path”:“E:\docker_data\windowsfilter\3d9d1161760455526157d49bdb7cdfadcc369368d58ba199b13b4a93ba0c6bc2”},{“ID”:“52d024d7-79e9-580a-9e43-e4b828ce0015”,“Path”:“E:\docker_data\windowsfilter\c8a790585f363385f9af1002152878356213279be00d947c538f3afc1646f6ea”},{“ID”:“77eb73fb-d1fd-5047-9c3d-4ad0e62e4895”,“Path”:“E:\docker_data\windowsfilter\93ced4e3a0d876e42a56a98bf3c85568f0e2b00823dcaf16008b310f3f7e0fc8”},{“ID”:“f7c1ae4d-4166-55c8-9211-755ded96333c”,“Path”:“E:\docker_data\windowsfilter\009714a2f3c81300b06e734ddfbd5a5e860f605be3fcbb9380d4235fa0cd0e7d”},{“ID”:“d20ee820-3133-53a2-a788-026ac3c03b81”,“Path”:“E:\docker_data\windowsfilter\d3dd8328df64fb8b325b7b5947f69eea7f1e37f209a9c9b10d9546aa029a1c1f”},{“ID”:“bd518e1b-be2b-5119-8598-6a0fe6c581a4”,“Path”:“E:\docker_data\windowsfilter\3e3061932d37d288d56b7f33764e4cee66d51d75437d05b4d3c0a7680c498ff9”},{“ID”:“6c8e865d-7842-5d36-8179-2c2b823e3d3d”,“Path”:“E:\docker_data\windowsfilter\a929f59479cb68853b47792938cc718dfb8d28f82793bbff309d46a70fe3100b”}],“HostName”:“8ff71c6c3851”,“HvPartition”:false,“EndpointList”:[“61DCF407-EC1B-4812-BE76-5348E8787B3E”],“AllowUnqualifiedDNSQuery”:true})

Any ideas? Surely you dont have to build the containers on the same OS that the container image is based on right?

what am I missing? Help