-2

I'm trying to do SwitchDaemon for docker on mac which is possible on Windows by using DockerCli.exe

Is there a way to get something similar like ./DockerCli.exe -SwitchDaemon on Mac OS?

Windows example.

Just in case Docker version:

Client:
 Cloud integration: v1.0.33
 Version:           24.0.2
 API version:       1.43
 Go version:        go1.20.4
 Git commit:        cb74dfc
 Built:             Thu May 25 21:51:16 2023
 OS/Arch:           darwin/amd64
 Context:           desktop-linux

Server: Docker Desktop 4.20.1 (110738)
 Engine:
  Version:          24.0.2
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.4
  Git commit:       659604f
  Built:            Thu May 25 21:52:17 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.21
  GitCommit:        3dce8eb055cbb6872793272b4f20ed16117344f8
 runc:
  Version:          1.1.7
  GitCommit:        v1.1.7-0-g860f061
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
Zakkaray
  • 7
  • 3
  • Is that for flipping between WIndows and Linux images? Not sure that's relevant on macOS. – tadman Jun 12 '23 at 00:49
  • I have a code that has this switching inside and I exactly need to switch to Windows docker engine. – Zakkaray Jun 12 '23 at 00:58
  • You'll probably need to make it aware of the type of Docker it's running on, and if that Docker can run Windows images. There's other differences, like the name of the commands. It's just `docker` on Linux and macOS. Windows is the odd one out here. – tadman Jun 12 '23 at 00:59

1 Answers1

1

It seems that it is possible to run Windows containers on MacOS by using a virtual machine as per this answer using this GitHub repo

However, likely for legal reasons, docker for desktop on MacOS does not contain a windows VM and cannot run Windows containers natively. It only contains a VM for Linux and only supports Linux containers natively.

Menachem Hornbacher
  • 2,080
  • 2
  • 24
  • 36