I have a very specific Docker/Windows question with very specific constraints. I hope I can find a conclusive answer ("no, it cannot be done", or "it can be done with these reproducible steps".)
I need to install the community edition of Docker, on Windows (not the licensed Docker Desktop, but the "raw" CLI).
This can be done in (the licensed) Docker Desktop using the DockerCli.exe program that comes with it. For example:
PS> .\DockerCli.exe -SwitchLinuxEngine
The need is to switch from using Windows containers to using Linux containers (in order to have dockerd pull and run some custom/legacy images that are based on Alpine.) Without this, Docker on Windows will complain as follows:
2020-09-18T03:30:24.0943834Z image operating system "linux" cannot be used on this platform
With Docker Desktop, this was no problem (just use DockerCli.exe to get the daemon to switch container strategies.)
But now that Docker Desktop requires a license, this is not an option (or it is not a preferred option.)
Unfortunately, I can't find a way to switch container strategies with just plain-vanilla docker (installed either with a direct release or via something like Scoop.)
So, my very specific question is this:
Can this be done on Windows with plain, bare-bones docker binaries, without relying on Docker Desktop, WSL2, etc? Maybe by using PowerShell to tweak the system, or using some other non-licensed and open-source CLI to do this magic?
I'm looking for a yes/no answer (and if yes, hopefully with reproducible instructions.)
If it cannot be done, I'm ok with that as long as I can document this.
Please note the strict context/constraints in which I'm framing this question.
Thanks, and have a great weekend.
PS.
I'm not looking to debate if WSL2 is good or not, or why I am not considering it as an option. Nothing wrong with WSL2, but there are operational constrains that make WSL2 a less desirable for a very specific business case (and which I'm not going to discuss here.)
Thanks.