Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker Desktop for Windows Dashboard runs but not Docker itself

I'm trying to start out with Docker and finding the environment on Windows very frustrating. About half the time I start my laptop Docker Desktop for Windows does not seem to start correctly.

Symptoms:

  1. Whale icon in system tray does not have any containers on its back:

enter image description here

  1. Right-clicking on the whale icon in the system tray shows only two items in the context menu - Dashboard and Settings:

enter image description here

  1. When the dashboard is open, the Docker and Kubernetes icons at bottom left are greyed out, and hovering over them show they are stopped:

enter image description here

  1. In the dashboard, if I select Settings, it hangs indefinitely trying to open the settings window:

enter image description here

  1. In the dashboard Troubleshoot window, the Restart button is greyed out:

enter image description here

I've tried restarting both the Docker Engine and the Docker Desktop Service in the services console. That made no difference. The only thing that seems to work is repeatedly restarting the machine until Docker Desktop for Windows runs. That's a less than ideal solution, however. Has anyone a better way of fixing this issue?

By the way, this is running Linux containers, with Kubernetes enabled.

like image 360
Simon Tewsi Avatar asked Apr 20 '21 09:04

Simon Tewsi


People also ask

Why is Docker not working Windows 10?

Operating System. If you do not run a 64-bit version of Windows Windows 10 Pro, Enterprise, or Education; 1511 November update, Build 10586 or later, you cannot run Docker for Windows. You can install Docker Toolbox if you have a 64-bit version of Windows 7 or later. Alternately, you do have the option to upgrade.

Is there an alternative to Docker Desktop for Windows?

Use Rancher Desktop, a free open-source application for Mac, Windows, and Linux. It simplifies building, pushing, pulling, running container images, and also includes Kubernetes. It's simple to use and has a built-in GUI.

How do I see running containers in Docker desktop?

When you open Docker Desktop, the Docker Dashboard displays. The Containers view provides a runtime view of all your containers and applications.


1 Answers

The following Stackoverflow answer, https://stackoverflow.com/a/67091896/216440, suggested using DockerCLI -SwitchDaemon to fix a similar issue, by switching from using Windows containers to Linux containers, or vice versa.

I tried it but it didn't fix the problem. However, it was the basis for something that did work.

What did work for me was forcing the daemon to use Linux containers, by running the following command in PowerShell:

& 'C:\Program Files\Docker\Docker\DockerCLI.exe' -SwitchLinuxEngine

I was already using Linux containers but, nonetheless, running that command got Docker Desktop for Windows working again.

The equivalent command to force the use of Windows containers may also work, although I haven't tried it:

& 'C:\Program Files\Docker\Docker\DockerCLI.exe' -SwitchWindowsEngine

like image 123
Simon Tewsi Avatar answered Oct 13 '22 02:10

Simon Tewsi