for-win icon indicating copy to clipboard operation
for-win copied to clipboard

[Unstable] There is no "Switch to Linux containers..." or "Switch to Windows containers..." option in the menu on Docker Desktop 4.25.0

Open v-mengwe opened this issue 3 years ago • 28 comments

OS Version: Win10 22H2/Win11 23H2 Docker Desktop: 4.25.0(126336) Regression: 4.24.2

Repro Steps:

  1. Install Docker Desktop 4.25.0.
  2. Right click the Docker Desktop icon.
  3. Check whether there is "Switch to Linux containers..." or "Switch to Windows containers..." option in the menu.

Expect: There is "Switch to Linux containers..." or "Switch to Windows containers..." option in the menu. image

Actual: There is no "Switch to Linux containers..." or "Switch to Windows containers..." option in the menu. image

More Info: This is an unstable issue, we verified this issue on 11 machines, 7 of them reproduced.

v-mengwe avatar Oct 26 '23 03:10 v-mengwe

same +1 , Install Docker Desktop 4.25.0 , "Switch to Windows containers" or "Switch to Linux containers" no shown option in the menu.

I am uninstall with Revo Uninstaller Pro : Docker Desktop 4.25.0 , windows registry , all file ... , install Docker Desktop 4.25.0 , both switch OK .

gitmgk avatar Oct 27 '23 09:10 gitmgk

+1. The same happened after update to 4.25.0

nogov avatar Oct 27 '23 15:10 nogov

+1

lkelly93 avatar Oct 27 '23 19:10 lkelly93

+1. DockerCli.exe is missing since 4.25.0

Florian2145 avatar Oct 27 '23 19:10 Florian2145

+1 on this issue and DockerCli.exe being missing. Windows 11 Enterprise.

Rhynier avatar Oct 31 '23 19:10 Rhynier

+1 v4.25.0

stevenxi avatar Nov 01 '23 15:11 stevenxi

Found this workaround in the release notes.

Switch to Windows containers option in the tray menu may not show up on Windows. As a workaround, edit the settings.json file and set "displaySwitchWinLinContainers": true.

The file can be found at $env:APPDATA\Docker\settings.json.

dmduggan avatar Nov 01 '23 16:11 dmduggan

+1 On windows 11

amruthasrini avatar Nov 01 '23 23:11 amruthasrini

+1 Windows 11 Pro

qtqgyt avatar Nov 02 '23 01:11 qtqgyt

Found a workaround; thanks to @dmduggan (with a few modifications.) As he said, in %APPDATA%\Docker\settings.json, first stop docker; set "displaySwitchWinLinContainers": false; then start docker; stop it again; and set "displaySwitchWinLinContainers": true. image

qtqgyt avatar Nov 02 '23 02:11 qtqgyt

Found a workaround; thanks to @dmduggan (with a few modifications.) As he said, in %APPDATA%\Docker\settings.json, first stop docker; set "displaySwitchWinLinContainers": false; then start docker; stop it again; and set "displaySwitchWinLinContainers": true. image

Same issue here. Thanks for solution 👍🏻

VadymPatuk avatar Nov 02 '23 12:11 VadymPatuk

+1

JustAnotherLars avatar Nov 03 '23 08:11 JustAnotherLars

+1

mmbednarz avatar Nov 06 '23 07:11 mmbednarz

+1 for me, even worse is with the workaround for the json file which I was able to update, I then cannot start the docker desktop service again as it doesn't work when dealing with a non-admin user (constant request for admin creds to then start said service) so I guess only way at present would have been to go back to a previous version of Docker Desktop till this is resolved.

paulh-utilita avatar Nov 06 '23 11:11 paulh-utilita

There also doesn't seem to be a working method for changing the engine via the command line right now. Previously, this was possible using dockecli.exe, which has not been available since version 4.25.

mmbednarz avatar Nov 06 '23 13:11 mmbednarz

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

dmduggan avatar Nov 06 '23 17:11 dmduggan

I tried with Podman on my box and it did the job so maybe until fixed will work for you too

rostacik avatar Nov 08 '23 07:11 rostacik

Changing docker context works for me for my scenario. Thanks.

mmbednarz avatar Nov 08 '23 07:11 mmbednarz

We've released a new version of Docker Desktop containing a fix for this issue, you can see the release notes! I'll close this issue for now, but if the issue persists, feel free to open a new issue!

lorenrh avatar Nov 14 '23 10:11 lorenrh

in %APPDATA%\Docker\settings.json, set "useWindowsContainers": false.

ttwmf avatar Dec 07 '23 10:12 ttwmf