What is the GUI restart actually doing?

Occasionally my Docker Desktop GUI just says “Error listing containers” or something to that effect and I need to restart it. I’m trying to write a script to detect and recover from this error but restarting by killing the Docker Desktop.exe process and restarting the com.docker.service does not fix the problem. Only when I use the Restart option from the system tray icon does my GUI come back to life.

What is this restart option actually doing which is different to killing the process and restarting the service?

I guess it gracefully stops everything in the virtual machine and restarts the VM, but Docker Desktop is for development not for using as a server, so how it exactly works and how it can be manahed from command line is not publicly available and currently found and working solutions can change any time. If you get “Error listing containers”, you can report the issue on GitHub

I don’t really understand what you mean by it being for development and not for running as a server. I run it on a NUC box to run a load of containers for my home use. It’s not a commercial production environment but it’s a production environment to me :slight_smile:

I understand that. I just wanted to point out that the information to help you is not available, because it is not meant to be managed from command line. You can use it for whatever you need it at home :slight_smile: If it were a server application, there would be a command line reference to properly restart it, but we only have the GUI and some parameters to install it from command line. I would still tell you how you could restart it, but I don’t know.

Is there a reason why you don’t use Docker CE, but Docker Desktop? What is the OS on the NUC box? Windows 10/11 or a server?

I thought Desktop was CE for Windows? NUC is Windows 10. I’ve considered reinstalling as Ubuntu but I have Plex and a few other things setup that I prefer to run on bare metal Windows. I would like a way to bypass Desktop though, I’ve heard it’s possible to run Docker straight on the Ubuntu WSL but I haven’t looked into that yet. Read a few things about networking being tricky.

Docker Desktop contains Docker CE in its virtual machine on each supported platform (Windows, macOS, Linux) while Docker CE runs containers directly on the host OS. If you have WSL, you can indeed run Docker CE in a WSL distro. Regarding network configuration, it means you need to make sure the network that Windows assigns randomly to your WSL2 distro does not overlap with the docker networks. Since it is changes every time you reboot Windows, already created Docker Networks can overlap with the new WSL2 network. Here is a general example:

But in WSL2, you need to chose a pool that starts witjh 192.168 or maybe 10. since WSL2 uses the same default as Docker

OK, this is my next project then. I was looking to move away from DD because my network throughput absolutely tanks for containers running inside it. I was hoping that running on WSL would improve that. Even the host NUC throughput drops by about 30% as soon as I start Docker and run a container.

I’m a bit lazy though so I might just get another NUC for docker and put Ubuntu on it.