I use Docker Desktop with WSL2 on my Windows computer. Some days when Docker Desktop tries to update or I have some other issue with it, it gets stuck stopping even after killing the associated processes in task manager. I would restart Docker Desktop and it would still say “Docker Desktop stopping.”
The way I fixed it was:
- Make sure Docker Desktop is totally stopped. Stop the app, kill the processes, everything
- Open powershell (my notes say I did this in an admin console but I’m not sure if it’s necessary to be admin)
wsl --shutdown
wsl --unregister docker-desktop
wsl --unregister docker-desktop-data
- Then start Docker Desktop again and let it start WSL etc
This worked for me but there’s a big caveat I think, the Microsoft docs have this :
Caution: Once unregistered, all data, settings, and software associated with that distribution will be permanently lost.
This doesn’t really matter for me as I don’t use Docker volumes at all (I mount local folders) and all my settings are saved as IaC as Docker Compose files, but if that doesn’t apply to you, make sure you backup what you need first.