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:
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.
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.
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.
When you open Docker Desktop, the Docker Dashboard displays. The Containers view provides a runtime view of all your containers and applications.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With