I just upgraded docker desktop to last version (4.25), and now the “DockerCli.exe” file is missing.
Now, I can’t switch between Linux and Windows containers using command line or via script, and therefore I can’t build automated multiplatform images.
Anyone has any idea or workaround?
Note: previously i was using the following command to switch between engines:
C:\Program Files\Docker\Docker\DockerCli.exe’ -SwitchLinuxEngine
C:\Program Files\Docker\Docker\DockerCli.exe’ -SwitchWindowsEngine
What is the
dockercli.exe? Shouldn’t it be
You can use
gcm in a PowerShell terminal to see where a binary is located.
For instance mine is in a customized location:
CommandType Name Version Source
----------- ---- ------- ------
Application docker.exe 0.0.0.0 D:\Program Files\Docker\Docker\resources\bin\docker.exe
Not the answer to your question, but I found this:
So according to a Docker Staff member in 2022, that exe is not meant to be used by end users so it can be removed or renamed or changed any way any time.
I’m still able to do:
& '.\Docker Desktop.exe' -SwitchLinuxEngine
This just opens up docker with current engine and does not perform switch in latest 4.25. Any other workaround to switching with cli?
Bugfix gone wrong
see release notes for 4.25:
Please reenable the option. I am on Windows 11 my colleage reported the problem on Windows 10 Pro, too
The issue mentioned here is different. We are here talking about the removal of dockerCli.exe binary from 4.25 and not having any alternate option to switch between linux and windows engines through CLI. We have a couple of scripts that relies on this capability.
A workaround for DockerCli.exe being removed is to used contexts.
PS C:\> docker context ls
NAME TYPE DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR
default * moby Current DOCKER_HOST based configuration npipe:////./pipe/docker_engine
desktop-linux moby Docker Desktop npipe:////./pipe/dockerDesktopLinuxEngine
desktop-windows moby Docker Desktop npipe:////./pipe/dockerDesktopWindowsEngine
There are three ways to take advantage of this:
docker context use to select the context.
- Use the
DOCKER_CONTEXT environment variable to select the context.
- Use the docker endpoint from above directly using the
DOCKER_HOST environment variable.
I think you’ll have to manually switch to the other OS once using the settings.json workaround from my previous comment. After that you should be able to switch back and forth (I personally use option 2).
Thank you. Using contexts is the way to go.
With contexts, now it’s easier and more standard.
The missing binary has been re-added in 4.25.1. Using context should be the way to switch once both engines are up. But I believe we will still need the dockerCLI to start the engine which does not start by default.