You're trying to create a uniform developer experience across two platforms that are wildly different.
If you find yourself spending a ton of time on a one-size-fits-all-disappoints-everybody solution, maybe its time to build two effective solutions instead.
Not quite true: Windows containers run natively on Windows. As of Windows 11, even Server 2022 containers can run using process isolation.
Something hilarious to me is that "multi-arch" images are a thing, and can result in the same dockerfile building a Windows image on a Windows PC, and a Linux image on a Linux PC!
This is a red herring and this feature only exists as a Microsoft platform strategy. I don’t know of anyone real using Windows executable docker containers on Windows hosts.
dockerd for windows isn’t even free software, last I looked.
If you find yourself spending a ton of time on a one-size-fits-all-disappoints-everybody solution, maybe its time to build two effective solutions instead.