DockerCli.exe missing in version 4.25

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

1 Like

What is the dockercli.exe? Shouldn’t it be docker.exe?

You can use gcm in a PowerShell terminal to see where a binary is located.

For instance mine is in a customized location:

gcm docker

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Application     docker.exe                                   D:\Program Files\Docker\Docker\resources\bin\docker.exe
1 Like

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.

1 Like

I’m still able to do:

& '.\Docker Desktop.exe' -SwitchLinuxEngine
1 Like

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

see release notes for 4.25:

For Windows

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:

  1. Use docker context use to select the context.
  2. Use the DOCKER_CONTEXT environment variable to select the context.
  3. 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.