Docker for Windows -SwitchDaemon easily

source : https://chrisjarrintaylor.co.uk/2018/05/03/docker-for-windows-switchdaemon-easily/

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”:

SwitchDaemon

….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.

Linux Containers:

Linux Container

Run the SwitchDaemon script:

& 'C:\Program Files\Docker\Docker\DockerCli.exe' -SwitchDaemon

Windows Containers:
Windows Containers
and there you have it, a very simple but extremely useful snippet to switch between Linux and Windows containers

Docker for Windows -SwitchDaemon easily

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s