Open jtnord opened 1 year ago
Try opening DockerCli.exe
with dotPeek
, look for a class called Docker.Cli.BackendCli
whose Run
method lists many of the options:
flags.If("-StartWSL2Engine", (Action) (() => this.RunEngine(EngineType.LinuxWSL2)));
flags.If("-StartWindowsEngine", (Action) (() => this.RunEngine(EngineType.WindowsContainers)));
flags.If("-StartHyperVEngine", (Action) (() => this.RunEngine(EngineType.LinuxHyperV)));
flags.If("-SharedDrives", new Action(this.SharedDrives));
flags.If("-Shutdown", new Action(this.Shutdown));
flags.If("-SwitchDaemon", (Action) (() => this.SwitchDaemon(new ContainerEngineMode?())));
flags.If("-SwitchLinuxEngine", (Action) (() => this.SwitchDaemon(new ContainerEngineMode?(ContainerEngineMode.Linux))));
flags.If("-SwitchWindowsEngine", (Action) (() => this.SwitchDaemon(new ContainerEngineMode?(ContainerEngineMode.Windows))));
flags.If("-h", new Action(BackendCli.Usage));
flags.If("--help", new Action(BackendCli.Usage));
flags.If("-Help", new Action(BackendCli.Usage));
if (!flags.Contains("--testftw!928374kasljf039"))
return;
flags.If("-Start", new Action(this.Start));
flags.If("-Stop", new Action(this.Stop));
flags.If("-Restart", new Action(this.Restart));
In this comment Stefan confirmed that DockerCLI has been removed from current versions of Docker Desktop.
I'm not sure what the replacement is, if any.
@chadmyers I just updated to latest DDfW which includes C:\Program Files\Docker\Docker\DockerCli.exe
... a brittle tool for sure, but seems still there... the linked comment suggests it may be removed
I had DDfW 4.25.0. I just upgraded to 4.27.1 and indeed it is back. Weird! Thank you @g0t4
@chadmyers maybe they tried getting rid of it!
I haven't spent much time on it but you might be able to replicate much of what it does by managing services in windows and wsl. DockerCLI.exe
is a .net app so it can be decompiled i.e. with dotPeek
Actual behavior
Expected behavior
Help is displayed (e,g the list of commands, and what they do) (even if the tool is somewhat internal - there needs to be a documented way to be able to programatically interact with the docker installation without a UI - even if this can change between release)
The
DockerCLI.exe
is useful for automation tools that need to perform tasks rather than going via a desktop UI.e.g. switching between windows containers and linux containers can be accomplished by using the
-SwitchDaemon
(documented here )but the other commands are effectively black boxes with no documentation.
I would like to assume that
-SwitchLinuxEngine
and-SwitchWindowsEngine
are the relatives to-SwitchDaemon
but switch to the specific platform and do a no-op if that platform is already used.Information
Output of
& "C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check
Why y'all assume people use powershell 😉
Steps to reproduce the behavior
"C:\Program Files\Docker\Docker\DockerCli.exe" -Help