Docker Desktop for Windows again keeps shutting down

I had trouble recently and couldn’t get my Docker Desktop on Windows 10 Pro version 10.0.19044. I tried to uninstall and reinstall it but was having no success until I figured out I had to enable my BIOS VM. When I did that, the installation succeeded and I’ve been using it without problems until now. Again, when I try to start my Docker Desktop it stops and never gets working again. I restarted my computer, and nothing. I need some help on how to track this down or clear the cache or something to make it work again. Please help. Sorry, I don’t know what else to do now. I’ve been searching here, but no success so far.

OK, I ask for help and keep searching for solutions. The last time Docker Desktop had failed to start I enabled my BIOS VM and the installation worked. Now, I activated Windows Hypervisor Platform feature and it worked again. I’m baffled. I really need to learn a lot more about Docker. I’d like to. Maybe some direction on that might help me.

I had WSL Ubuntu-20.04 LTS, but I was running wsl1. I converted it to wsl2. Maybe that explains why it worked when I activated Windows Hypervisor. Does running wsl2 mean that now I don’t have to run Hypervisor? I think in the past I had activated it and it conflicted with something I was running. It would be nice not to have to be watching out for that.

Docker has many components and different on each platform. On Mac and Windows you need to create a virtual machine to run Linux containers. This is what Docker Desktop does for you. On Windows it need either Hyper-V or WSL2. When you update Windows or Docker Desktop, things can change. Maybe you accidentally disabled a Windows feature manually or by installing an other software. If converting WSL1 to WSL2 solved your problem, then I guess you somehow changed the backend from Hyper-V to WSL2, or a Docker Desktop update did it, because it could have never worked with WSL1. If you follow the official documentation it shows you the requirements. Make sure you enable the required features.

Yes, you’re right, and I mentioned that as I continued searching. Everything was working again. I converted WSL from 1 to 2, For the time being I left the Hyper-V feature on. I have always started with the official documentation requirements. All the required features are enabled. I also mentioned that.

But even then, here I am AGAIN. Today I’m back to the same nonsense. Docker Desktop is once again failing to start. It opens with a message saying Docker Desktop stopped. then it starts, and then it crashes again.

On the Windows features: Now that I have WSL 2 enabled (and Docker Desktop recognized that in its settings. I turned on the integration, refreshed, and it was enabled). I have now gone back and turned OFF Hyper-V. WSL feature is of course also enabled.

I had also set it to start with system start. Now I just turned off the service and checked to see if any processes are still running to kill them too. Two handles remain open, but I haven’t messed with them because it might cause system instability. I could do a reboot, but Docker is set to start up with the system. I can sign in to Docker Hub, but that doesn’t let me do anything about Docker Desktop settings.

From elevated command prompt, wsl -l lists two Docker Linux machines: docker-desktop-data and docker-desktop, and also my WSL2 Ubuntu-20.04 (Default). I see that openSUSE-42 and SLES-12 are available. Should I install one of them? Running the list --verbose shows they’re all version 2, but also shows them all as stopped; --status shows the kernel version as 5.10.102.1.

I somehow get a chance to sign in if I do it quickly, but then I get credentials are being verified, apparently successful because I get another message saying:

"You’re Almost Done!

We’re redirecting you to the desktop app. If you don’t see a dialog, please click the button below." It freezes there, sometimes with another small popup saying: “Sorry, no log in session.”

HOKEY SMOKES! After all my attempts, it occurred to me to right click on the Docker Desktop start icon and select “run as administrator.” That WORKED! Where was that simple instruction?

LET ME SCREAM THIS - MAKE SURE YOU START YOUR DOCKER DESKTOP AS ADMINISTRATOR!!!

2 Likes

In order to start it with an unprivileged user, the user needs to be added to the local docker-user group. I don’t remember if it exists after the installer is finished, or it is started once as admin.

Run this command in an admin terminal (cmd/powershell both should be fine):

net localgroup docker-users "your-login-name" /ADD

Afterwards your user should be able to start and use Docker Desktop.

Update:
The docs also describe how it’s done using the ui:

Your first command was not found by powershell. I’m assuming that by “your-login-name” you mean my Windows login. My docker desktop login name is not that. It is different. So, OK, I went into Computer Management as an admin and looked at the members in the docker-users group. My Windows login username (which is also an Administrator) is in there. I tried to add a user with my docker login name and that was not allowed. This is only for users in Windows, not in Docker.

I had this working for a while, but today I’m right back to the same crap. I try to start Docker Desktop as an Administrator. When it begins, it says Docker Desktop has stopped. After a bit, it says Docker Desktop is starting, then promptly stops. I try stopping the service and restarting it, but get the same results. This is super frustrating.

Wow, hold on. I just noticed that I have two Users. Although I routinely log into one of those, I use the same username to log in. On careful review, I saw that the user directory in my Powershell base at startup of the terminal is not the same username I am regularly using. I think I wasn’t noticing any problems because that username is an Administrator, but when I added the other login username (so now I have both) to the docker-users, Docker Desktop started up! Thank you so much for your help!!!

Yep. I haven’t thought that “your-login-name” would be ambiguous. It needs to be the windows SamAccountName, the one you type in when login to Windows

My pleasure!

It seems that I have it working again, thanks to some help here. Now I’m going to try to move on to setting up a Supabase incident? with Docker.

Same issue I am facing from last 1 month after certain period of time docker desktop uninstalled Please let me know what is the solution for this issue.

Uninstalled not stopped? Docker Desktop would not uninstall itself so if that happens that must be an antivirus or other security related software that runs periodically and and misinterpreting what Docker Desktop is…

was in same situation, downloaded new installer via website, updated via replacement installation. restarted pc, ran docker as admin, worked for me :slight_smile: