If you are using Docker for Windows and want to switch between Linux or Windows containers you can do this by right clicking the Docker “Whale” in the systray and selecting “Switch to Windows containers”:
….but no one likes clicking around do they!
There is an alternative way to do this which I use in my docker session demo’s which makes things so much easier and the switch is a lot quicker! In powershell, run the script below and it’ll switch from Linux to Windows containers and vice versa:
Run the SwitchDaemon script:
& 'C:\Program Files\Docker\Docker\DockerCli.exe' -SwitchDaemon
and there you have it, a very simple but extremely useful snippet to switch between Linux and Windows containers,