Switch docker-machine: Server stuck on linux

Hello,

I am running docker for windows on windows 10. I am using docker with no problems from powershell. I am looking into easy ways to ship docker images, and came across docker-machine for this purpose.

I installed docker-machine, however it must be run in administrator mode. This is required on windows, because the driver for docker-machine is hyper-v and hyper-v commands require elevated access.

I got docker-machine running elevated without issues. I did the appropriate env configuration and connected my (powershell) shell to docker-machine.

The issue I have is that I want docker-machine server to run windows, so that I can test shipping my windows images which I built on the same workstation in docker, and it is using linux by default.

The problem: I can find no way to change the windows-machine Server OS/Arch from linux to windows. I tried using the DockerCli.exe with -SwitchDaemon (i.e. & $Env:ProgramFiles\Docker\Docker\DockerCli.exe -SwitchDaemon) but this did not work. All it did was break the daemon the shells running without administrative privileges which were not using docker-machine. Resetting the switch from the task bar got the un-elevated shells working again, but I am still left with this problem.

How can I change the docker-machine Server OS/Arch??

I want to run docker with windows client and windows server, and I want to run docker-machine on the same workstation also with windows client and windows server OS/Arch. Right now docker is working fine, but docker-machine does not seem to have it’s own switch to control it’s behavior. Trying to use dockercli.exe is just affecting my workstations normal docker, not affecting docker-machine.

To answer my own question, I think I was too focused on docker-machine. Though I still can’t switch docker-machine server OS/arch independently from locally installed ‘docker for windows’ server OS/arch, effectively making it impossible to independently manage ‘docker for windows’ and docker-machine on the same host, since there is only one exe for the switch and it is tied to docker for windows server, and this still seems like a limitation, it is not so much of a factor because any docker installation can join the swarm, not just nodes created through docker-machine.