Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endless "Docker desktop stopping" #12576

Open
1 of 3 tasks
Eugentis opened this issue Feb 22, 2022 · 54 comments
Open
1 of 3 tasks

Endless "Docker desktop stopping" #12576

Eugentis opened this issue Feb 22, 2022 · 54 comments

Comments

@Eugentis
Copy link

Eugentis commented Feb 22, 2022

  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID: Diagnostic is not available too

Actual behavior

Docker Desktop freeze at Docker Desktop stopping.

Expected behavior

  1. At install stage Docker asks which mode I preffers
  2. Docker settings available at any time. On changing smth it will restart containers
  3. Docker app starts and allows to switch used mode

Information

Several months I didn't use Docker at Windows 10 Pro(v.4.2). Today I've tried to start it. It freezes at "Docker Desktop starting" stage.
I've tried to remove and install Docker Desktop. As I understand it tries to start at WSL2 (Why you can't ask it at install stage?)
How can I switch it to Hyper-V mode if it can't start?
Why setting are not available while full app with all containers will be loaded?

@pascalberger
Copy link

Same here with Docker Desktop 4.5.1 running on an Win 10 Pro Azure VM. On startup it says that WSL is missing, but then is stuck in Docker Desktop stopping state, which means that it is not possible to switch to Hyper-V backend.

@StefanScherer
Copy link
Member

Hi @Eugentis, If you want to switch to Hyper-V you can edit the $env:APPDATA\Docker\settings.json file and set wslEngineEnabled to false.

We're looking how we can improve the settings and unblock them for such tasks.

@Eugentis
Copy link
Author

Eugentis commented Mar 6, 2022

Thanks @StefanScherer

But disabling app settings is not the best solution in real world. It should be available independent on Docker engine status

@rubikscube09
Copy link

Same here with Docker Desktop 4.5.1 running on an Win 10 Pro Azure VM. On startup it says that WSL is missing, but then is stuck in Docker Desktop stopping state, which means that it is not possible to switch to Hyper-V backend.

Also having this issue, with same version of Docker on Win 10.

@ajay16bharadwaj
Copy link

ajay16bharadwaj commented Apr 13, 2022

A solution that worked for me from the front-end: Go to docker desktop --> Troubleshoot --> Clean / Purge data --> click on wsl 2 and delete.

Once removed, the docker deamon restarted and it worked fine.
image

@Eugentis
Copy link
Author

@ajay16bharadwaj it works if your dashboard is active
But Docker has some strange behaviour with it.If you started or stoped container all dashboard wil be disabled
As for me it is very strange approach

@sreepriyadeepak2021
Copy link

Facing same issue ..Any fix for this?

@Eugentis
Copy link
Author

@sreepriyadeepak2021
#12576 (comment)
This solution helps me to enable Docker

@prakharrathi25
Copy link

A solution that worked for me from the front-end: Go to docker desktop --> Troubleshoot --> Clean / Purge data --> click on wsl 2 and delete.

Once removed, the docker deamon restarted and it worked fine. image

This worked for me, thanks!

@algaeReed
Copy link

1.download this soft from https://docs.microsoft.com/en-us/sysinternals/downloads/rammap
2.
image
3.restart docker desktop
4.It's work!
image

@Singharnav23
Copy link

I have tried every thing still i am unable to open the docker it is stuck on docker desktop stopped...... Any help?

@sudoberlin
Copy link

Try to update the WSL (.msi extension). after installing this app is working fine.

@jcs090218
Copy link

I have tried latest Docker 4.9.0, the key is

$ wsl --update

@Etornam09
Copy link

I tried all the stuff already posted above but all to no avail. I realized that each time I restarted the docker desktop app, a "WSL 2 Installation incomplete" pop-up message comes. I clicked the link and reinstalled the kernel update and it worked.
Embedded Error

@mujeebishaque
Copy link

Faced the same problem. Restarted my pc and it started working.

@LuuanOliveira
Copy link

Eu tentei o Docker mais recente 4.9.0, a chave é

$ wsl --update

Após executar esse comando e reiniciar a máquina, o docker desktop funcionou corretamente!

After running this command and restarting the machine, docker desktop worked correctly

@manzambi11
Copy link

manzambi11 commented Jul 18, 2022

Make sure after Docker For Desktop (Windows) installation thatWSL (Windows subsystem for Linux) is installed.
before your linux configuration machine, at powershell: wsl --set-default-version 2

It is solved my issue.

@attauf
Copy link

attauf commented Jul 19, 2022

Hi @Eugentis, If you want to switch to Hyper-V you can edit the $env:APPDATA\Docker\settings.json file and set wslEngineEnabled to false.

We're looking how we can improve the settings and unblock them for such tasks.

This worked for me, Thanks.

@meSATYA
Copy link

meSATYA commented Jul 23, 2022

I am able to run Docker Desktop by following below steps.

  1. Use WSL V2 to smoothly run Docker Desktop. To set default wsl version to v2, run wsl.exe --set-default-version 2

  2. Install your Linux flavor. I tried with Ubuntu-18.04 by running command: wsl --install -d Ubuntu-18.04

  3. Above command will install ubuntu with WSL V2, but to make sure you can run command: wsl.exe --set-version Ubuntu-18.04 2

  4. To check the version of your installed linux flavor and respective wsl version: wsl.exe -l -v
    image

  5. Then freshly install Docker Desktop for Windows. It should start running within sometime.
    image

@ybqdren
Copy link

ybqdren commented Jul 24, 2022

Hi, I also ran into this problem, I don't know exactly what happened, But I think it should be wsl that went wrong, because my wsl can't be opened; After I referred to this answer, I did a reset of the network.

I executed the following two commands:

netsh int ip reset

netsh winsock reset

And restarted my computer,I can open my wsl now:
image

@adou2
Copy link

adou2 commented Aug 4, 2022

I have tried latest Docker 4.9.0, the key is

$ wsl --update

This work for me as well ...
(update: after few restart I am still facing the problem)
temporary solution (which work for me)
Powershell

  1. Force stop docker desktop (task manager)
  2. Run wsl --shutdown in power shell
  3. Start docker desktop again

@tanyeun
Copy link

tanyeun commented Aug 4, 2022

I ran into this problem today.
This is really bad, I wish they can fix it soon.
Hardware: ASUS TUF DASH F15
Software: Windows 10 Home 21H2 (OS build: 19044.1826)
Docker Version: latest as of today ( I was not able to go to the settings page. It was running forever)

Here were the list of things I tried but didn't work:

  1. Uninstalled the current version and installed the latest on docker official website.
  2. Go to Troubleshoot on docker desktop and click "Clean/Purge data" (click on wsl 2 and delete)
  3. Go to Troubleshoot on docker desktop and click "Reset to factory defaults"
  4. Edit the $env:APPDATA\Docker\settings.json file and set wslEngineEnabled to false

At least point I found that my WSL was broken by trying to get Docker to work.
I was not able to try the solutions provided above that relates to running the wsl command.
Whenever I typed wsl, it was waiting forever on my terminal and nothing happened.

The fact that Docker destroyed my WSL really pissed me off because I relied on WSL to do all the source
control on my machine and interact with remote machines.

@ehsaan90
Copy link

ehsaan90 commented Aug 5, 2022

I tried all the stuff already posted above but all to no avail. I realized that each time I restarted the docker desktop app, a "WSL 2 Installation incomplete" pop-up message comes. I clicked the link and reinstalled the kernel update and it worked. Embedded Error

This issue will be resolved by modifying the settings.json file.
1- Path of the file: C:\Users<username>\AppData\Roaming\Docker\settings.json
2- Set "wslEngineEnabled": false

@SoderJuliano
Copy link

Hi @Eugentis, If you want to switch to Hyper-V you can edit the $env:APPDATA\Docker\settings.json file and set wslEngineEnabled to false.

We're looking how we can improve the settings and unblock them for such tasks.

Already did and still not working.

@prashantsoni
Copy link

Try following.

  1. If there is a VPN running, try disconnecting VPN and restart Docker Desktop.
  2. Click on troubleshoot (bug) icon on the right top corner, perform a factory reset, and purge data.

@buriihenry
Copy link

buriihenry commented Aug 15, 2022

To resolve this issue, as shown in dialog “Docker Desktop – Install WSL2 kernel update” we need to download from the reference link mentioned in dialog – https://aka.ms/wsl2kernel

Install the WSL2 kernel update then restart Docker. This should work

Image for reference
image

@aadeethyeah
Copy link

Either Docker or Windows should do something for this. None of the solution is working for me.

@NavnathKumbhar
Copy link

NavnathKumbhar commented Sep 27, 2022

A solution that worked for me from the front-end: Go to docker desktop --> Troubleshoot --> Clean / Purge data --> click on wsl 2 and delete.
Once removed, the docker deamon restarted and it worked fine. image

This worked for me, thanks!

This worked for me.
Thank you, you saved my hours! 👍

@Crackboomlaboom
Copy link

I am experiencing the same issue and trying to resolve that issue as at the moment.

@eli-front
Copy link

same issue m1 mac pro

@xobs
Copy link

xobs commented Dec 4, 2022

Deleting the data sets does not appear to work. Docker has been stuck in "Shutting Down", and cannot be quit. It has been showing this for over an hour:

image

@Squadz
Copy link

Squadz commented Dec 27, 2022

Same issue here on Windows 11. It was working fine the whole day, and it suddenly crashed.

I tried the following:

  • Reset networking (netsh int ip reset + netsh winsock reset)
  • Updated WSL (wsl --update)
  • Purge Data
  • Upgraded to latest version

Before the upgrade, the application was stuck on "Stopping Docker".
After the upgrade, the application is stuck on "Docker Desktop Starting"

C:\Users\username>wsl.exe -l -v
  NAME      STATE           VERSION
* Ubuntu    Running         2

Workaround:

  • Completely uninstall Docker Desktop on Windows 11
  • Opened a terminal with Linux subsystem (WSL), and installed Docker with the CLI (article) as I'm not using any Windows images.

@aadeethyeah
Copy link

Damn so many people out there are facing this issue.
I don't know what is @docker or Windows(for WSL) doing about this.
I thought only Windows users are facing this but looks like we've got Mac as well.

Solution:
So I have almost tried all the above workarounds but what worked for me is I installed little older version of docker and then both WSL as well as Docker started working fine.
Hope it helps to everyone.

@vmdo2
Copy link

vmdo2 commented Dec 31, 2022

A solution that worked for me from the front-end: Go to docker desktop --> Troubleshoot --> Clean / Purge data --> click on wsl 2 and delete.
Once removed, the docker deamon restarted and it worked fine. image

This worked for me, thanks!

how long does it usually take to delete?

@EMStokely
Copy link

EMStokely commented Jan 13, 2023

The solution is simple if you are on Windows 10/11 using "Dockers Desktop for Windows"

When Dockers Desktop for Windows installs it looks like it does not bother to check the OS being used and defaults to "Linux Containers". This fails on Windows 10 or 11 and causes the "Docker Is Starting" freeze. (I also saw numerous uncaught Promise errors in the docker logs related to this, too).

To fix this, simply go to your Notifications/System Tray area of Windows in the lower right-hand corner of the screen, click the dockers "whale" icon, and in the pop up context menu choose "Switch to Windows containers...". The Dockers software immediately resolves for Windows users and asks you to create a Dev Environment.

https://stackoverflow.com/a/75105105/5555938

Docker Desktop 4.16.0

@mulder999
Copy link

wsl -l -v showed docker-desktop stucked in installing state:

C:\WINDOWS\system32>wsl -l -v
  NAME                   STATE           VERSION
* Alpine                 Stopped         2
  docker-desktop-data    Stopped         2
  Ubuntu-22.04           Stopped         2
  docker-desktop         Installing      2

wsl --shutdown solved the issue for me.

@ajwtech
Copy link

ajwtech commented Feb 8, 2023

, simply go to your Notifications/System Tray area of Windows in the lower right-hand corner of the screen, click the dockers "whale" icon, and in the pop up context menu choose "Switch to Windows containers...". The Dockers software immediately resolves for Windows users and asks you to create a Dev Envir

I'm not 100% sure, but I believe all you did here was tell it to ignore your problem with WSL. This doesn't help fix the actual issue.

@chon27
Copy link

chon27 commented Feb 13, 2023

I had same problem on Windows 10 and I have solved this way:

image

In Windows features I've deactivate WSL and restart PC. Then activate again, restart and it Docker Desktop goes working again.

@Nikhil26112
Copy link

If anyone is still facing this issue. This solution will work:- I fixed this issue by enabling SVM(Secure Virtual Machine) in my bios OC explorer advanced settings. That solves the problem and docker will start running.

@ayyoub-afwallah
Copy link

A solution that worked for me from the front-end: Go to docker desktop --> Troubleshoot --> Clean / Purge data --> click on wsl 2 and delete.

Once removed, the docker deamon restarted and it worked fine. image

This does actually work but first, i had to enable these windows features: Virtual Machine Platform, WSL, and Hyper-V.

Thanks!

@Felix-Meyer
Copy link

A solution that worked for me from the front-end: Go to docker desktop --> Troubleshoot --> Clean / Purge data --> click on wsl 2 and delete.
Once removed, the docker deamon restarted and it worked fine. image

This does actually work but first, i had to enable these windows features: Virtual Machine Platform, WSL, and Hyper-V.

Thanks!

This FINALLY solved it for me. Thank you SO! much.

@shroot91
Copy link

I tried all the stuff already posted above but all to no avail. I realized that each time I restarted the docker desktop app, a "WSL 2 Installation incomplete" pop-up message comes. I clicked the link and reinstalled the kernel update and it worked. Embedded Error

This issue will be resolved by modifying the settings.json file. 1- Path of the file: C:\Users\AppData\Roaming\Docker\settings.json 2- Set "wslEngineEnabled": false

Thanks a lot!

@AchaWang
Copy link

Right click on the docker icon and choose "Switch to Linux Containers", it works for me !!!
docker

@flatline-studios
Copy link

TL;DR: If you can, just ditch Docker Desktop for Windows, and just run docker through your preferred WSL2 distro.

I decided to just uninstall Docker Desktop. It chews up a ton of additional resources, works intermittently, doesn't provide any functionality that I can't get elsewhere, would consume a ton of CPU after awaking from Hibernate, and had too many caveats that I'd had to work around for too long.

If you don't actually need any of the features of Docker Desktop, or need to use Windows containers, then I'd recommend just installing vanilla docker on your WSL2 OS of choice, and working with the \\wsl$\{distro} directory within Windows to interact with your data. It took a little while to shift everything over, but once I did it was much simpler. I could run my SQL database container without having constant workarounds with data file permissions, and whole host of other crap.

I know it's a pain, and probably not what people are looking for from a response to this issue, but I've really found it much simpler in the long run.

@douglasg14b
Copy link

Can't access docker desktop to do most of this stuff...

image

@bsplosion
Copy link

Hi @Eugentis, If you want to switch to Hyper-V you can edit the $env:APPDATA\Docker\settings.json file and set wslEngineEnabled to false.

We're looking how we can improve the settings and unblock them for such tasks.

This fixed my issue as well. Of note, I actually am running WSL1, not WSL2, and need to use WSL1 for localhost loopbacks. I suspect there is some wacky behavior between WSL1 and Docker Desktop, though it wasn't consistently broken (just at the worst times, of course). If you need to stay on WSL1, definitely try flipping back to Hyper-V with the config change.

@paulschek
Copy link

Definitely connected to hibernation.

This happens on multiple machines I own.

After first hibernation, it just slows down to a crawl. Stating / Stopping containers takes ages. Rebooting the Docker Windows doesnt help - reboot gets stuck.

Rebooting the machine helps resolve this.

This issue started to happen after V4 Docker Desktop - makes it impossible to work on machine without rebooting it all the time.

@fartwhif
Copy link

fartwhif commented Nov 2, 2023

A solution that worked for me from the front-end: Go to docker desktop --> Troubleshoot --> Clean / Purge data --> click on wsl 2 and delete.

Once removed, the docker deamon restarted and it worked fine. image

does this remove your containers?

@MagnusNilsson11
Copy link

MagnusNilsson11 commented Nov 7, 2023

TL;DR: If you can, just ditch Docker Desktop for Windows, and just run docker through your preferred WSL2 distro.

I decided to just uninstall Docker Desktop. It chews up a ton of additional resources, works intermittently, doesn't provide any functionality that I can't get elsewhere, would consume a ton of CPU after awaking from Hibernate, and had too many caveats that I'd had to work around for too long.

If you don't actually need any of the features of Docker Desktop, or need to use Windows containers, then I'd recommend just installing vanilla docker on your WSL2 OS of choice, and working with the \\wsl$\{distro} directory within Windows to interact with your data. It took a little while to shift everything over, but once I did it was much simpler. I could run my SQL database container without having constant workarounds with data file permissions, and whole host of other crap.

I know it's a pain, and probably not what people are looking for from a response to this issue, but I've really found it much simpler in the long run.

Are you using dev containers in vscode using this setup?

@THEDATALORD-BUILDS
Copy link

  1. I was able to go into %appdata%\Docker and edit the settings.json
  2. Change the line to "wslEngineEnabled": false,
  3. Save and restart docker engine

@LGsus20
Copy link

LGsus20 commented Jul 8, 2024

I'm using windows server 2019, in which there are multiple accounts.
My main account didn't have problems, but the secondary account started having problems.
Since my main account worked I tried deleting "AppData/Roaming/Docker" and "AppData/Roaming/Docker Desktop" but didn't work.

The solution was to copy the AppData/Roaming/Docker" and "AppData/Roaming/Docker Desktop" from my main account, into my secondary account, tried multiple things and this was the only one that worked.

@paulschek
Copy link

The only thing that works for me is running this in PowerShell (Admin):

taskkill -IM "wslservice.exe" /F

@dynamiclynk
Copy link

A solution that worked for me from the front-end: Go to docker desktop --> Troubleshoot --> Clean / Purge data --> click on wsl 2 and delete.

Once removed, the docker deamon restarted and it worked fine. image

Combining this with the wsl --update worked #12576 (comment)

@fartwhif
Copy link

if every update jeopardizes existing containers then the entire pursuit is for the birds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests