8

I have installed latest Docker Desktop. Currently unable to switch to Windows container. The option is blocked from task bar : Option is disabled from Docker Desktop

I am running Windows 10 Home 64-bit Build 19042.

2

4 Answers 4

6

You need windows 10 Pro or Enterprise to have access to Windows containers.

Source

The other answer will indeed switch your daemon mode to Windows, but you will not be able to pull any Windows container.

Update 2022: The link above now mentions that it should work for

  • Windows 11 64-bit: Home or Pro version 21H2 or higher, or Enterprise or Education version 21H2 or higher.
  • Windows 10 64-bit: Home or Pro 21H1 (build 19043) or higher, or Enterprise or Education 20H2 (build 19042) or higher.
3
  • 2
    This is correct, but needs to be clarified as the requirements say Win Home edition is compatible.
    – code4days
    May 11, 2022 at 20:53
  • This tripped me up, too. Win Home doesn't work for me even when I switch to "Windows containers". In fact, even when I switch, the option to switch back to "Linux containers" doesn't show. Still says switch to Windows containers, so I'm doubtful that is even happening. May 25, 2022 at 16:54
  • @MatthewAllen according to your actual Windows version you might need to upgrade to either a Pro or Enterprise edition. I had your exact issue when I found this solution.
    – mababin
    Jun 7, 2022 at 16:08
5

I had spent hours debugging this issue and have to purchase win 10 pro license as well but still faced the same issue, by default it takes linux containers, switching to windows shows waiting forever, anyway here is how I fixed:

  1. Windows Pro

  2. Close/Shutt down the client by right clicking on the tiny icon on taskbar, and wait for a minute or two to have it close itself. 3.Open command prompt with Administrative rights

  3. Type in this command:

    c:\Program Files\Docker\Docker\resources>dockerd.exe

  4. Open another command prompt with Administrative rights

    C:\Program Files\Docker\Docker>DockerCli.exe -SwitchDaemon

  5. Type "C:\Program Files\Docker\Docker>docker version" command to make sure it has switched to windows containers, it should look like attached screenshot screenshot as per the latest Docker Desktop version, your settings should look like this enter image description here

Quit Docker Desktop, and open again, Hope it helps some.

1
  • this worked for me, after being unable to switch using the taskbar icon's menu
    – ekrall
    Dec 18, 2022 at 4:55
4

enter image description here

This command will change from windows to linux and vice versa. enter image description here

2
  • 1
    I am unable to pull Windows images even after doing this
    – mababin
    May 26, 2021 at 19:58
  • 2
    You need Windows Pro or enterprise to be able to use this feature.
    – mababin
    May 26, 2021 at 21:01
0

I could not switch it easily, even using Altaf's approach. Eventually I went to Services (services.msc) and disabled Docker Desktop Service and updated docker service (Docker Engine) to make sure it can automatically start (for example, make sure the daemon.json config file exists in the location as the service command specified). Then I can verify the result by typing docker version (in non-Administrative command prompt).

https://kontext.tech/article/1216/how-to-change-docker-data-root-path-on-windows-10#h-switch-to-windows-containers

3
  • It seems your Docker Desktop app is not working correctly, have you enabled WSL 2 and other requirements as outlined here docs.docker.com/desktop/install/windows-install?
    – Altaf
    Dec 31, 2022 at 16:05
  • Yeah, I did enable it as WSL2 is my main developer tool on Windows. Jan 1 at 22:14
  • as per the latest Docker Desktop version, your settings should look like this
    – Altaf
    Jan 3 at 8:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.