293

I have installed a Docker stable version, and it took forever to start. Until now I have not seen the notification showing Docker is running. I can only see the Docker icon at the taskbar, showing Docker is starting.

I am running on Windows 10 Pro, Intel Core 2 Duo E8500, supporting virtualization.

7
  • 11
    I have to restart my system every time to get Docker started. Commented Oct 10, 2019 at 10:00
  • 6
    hate to say this, but it is running fine after restarted Windows system
    – http8086
    Commented Sep 7, 2021 at 9:42
  • 1
    Consider checking out this answer in another very similar question. This will solve the problem: stackoverflow.com/questions/71238673/…
    – Metafaniel
    Commented Mar 12, 2022 at 5:37
  • On Windows 10: Docker worked fine yesterday, today eternal "Docker is starting..." - only solution was a fresh install *cursing Commented Sep 1, 2022 at 9:33
  • that's will works on Windows 11 stackoverflow.com/a/67688891/15517013
    – Linar
    Commented Jan 29, 2023 at 7:47

44 Answers 44

238

Important Note: As @Nachtalb said, "I think it should be noted that this removes all docker containers and data. (WLS: Unregisters the distribution and deletes the root filesystem)."

Thanks to https://github.com/docker/for-win/issues/7050, first, exit the docker hub desktop, then run these two commands in PowerShell:

wsl --unregister docker-desktop
wsl --unregister docker-desktop-data
13
  • 2
    While I still had to reinstall, these commands were also necessary to fully clean all the old stuff out.
    – Erica Kane
    Commented Jul 27, 2020 at 23:10
  • 5
    After these commands my docker failed to start. Then i followed these steps and it worked. github.com/docker/for-win/issues/3764#issuecomment-484428134
    – Karthik P
    Commented Dec 22, 2020 at 8:54
  • 3
    thanks. this one did it for me. i stopped docker which was stuck on starting, ran the two above commands, and started it agian, and it started successfully. Commented Dec 30, 2020 at 11:40
  • 1
    What to do if the two commands are always "unregistering" and do not stop?
    – Chris Tang
    Commented Dec 28, 2022 at 6:40
  • 1
    Running these commands I found that it returned error 'There is no distribution with the supplied name'. In this case the solution from Stokely worked. So if anyone does get that error then the other solution may be worth a try. Commented Jan 28, 2023 at 11:47
146

I stumbled upon the solution which turned out to be super simple! When Docker installs on a Windows device it doesn't bother to check if your Operating System is Windows, not Linux. So, it tries to start up looking for Linux containers that do not exist. Just set it to run under Windows containers:

  1. In the lower right-hand corner of Windows, in your Notifications/System Tray section, right-click the docker "whale" icon.

  2. In the context menu that pops up, choose "Switch to Windows containers..."

  3. This should unfreeze "Dockers for Windows" instantly! If it does not, close "Dockers for Windows" and open it again.

An image of the context menu for Docker, with the option titled "Switch to Windows containers..." circled.

6
  • 3
    Worked for me! Switch to windows containers - unfreezes the starting... - switch back to linux containers - everything fixed! I used to completely uninstall and reinstall docker for this, losing all my containers in the process...
    – mmey
    Commented Mar 24, 2023 at 9:47
  • Did not work for me at all. I selected "Switch to Windows containers...", confirmed the popup and nothing happens. I can close Docker-Desktop window and restart but still the same problem. It hangs so badly that it does not even switch at all.
    – Jörg
    Commented Jul 11, 2023 at 14:58
  • 1
    Kind of worked... I switched, nothing happened. But when I switched back to Linux Containers everything worked again, after a short delay.
    – robs
    Commented Aug 1, 2023 at 5:38
  • Does not work for me too.
    – Čamo
    Commented Aug 3, 2023 at 7:48
  • 3
    Task nanager -> services ->WslService restart worked for me.
    – Čamo
    Commented Aug 3, 2023 at 8:01
132

Personally, the most non-destructive method for myself has been to use:

  1. wsl --terminate docker-desktop
  2. wsl --terminate docker-desktop-data
  3. Close Docker Desktop GUI (cancel/close any error messages)
  4. Start Docker Desktop again.

Docker then indicates its starting the wsl services during its start process and my issues are resolved.

Other methods (like register/unregister) tend to be much more destructive and I lose configuration/data/volumes.

9
  • 11
    It works for me without the need to restart or even purging my data. Thanks! P.s: You may also need to force close the docker app via Task Manager. Commented Nov 9, 2021 at 1:56
  • 7
    This should be marked as the correct solution, worked like a charm on Windows 10 + WSL2
    – Meir Gabay
    Commented Jun 30, 2022 at 12:03
  • This worked for me, upvoted. In case anyone wonders where to paste these commands, it Powershell when run as administrator. Commented Jul 8, 2022 at 9:01
  • 1
    I tried to use these commands but power shell was not responding to these commands. Commented Dec 21, 2022 at 18:21
  • 5
    Did not worked for me. Even after killing the Docker Desktop.exe processes it still gets stuck statring...
    – icelava
    Commented Jan 17, 2023 at 6:38
30

I guess you are using wsl2 features. In that case, open PowerShell or command prompt and type: optionalfeatures.exe

scroll down and uncheck

Windows Subsystem for Linux

apply the changes and restart your computer.

After restart follow the previous steps again and check

Windows Subsystem for Linux

and restart again. Hopefully now your docker will run

5
  • 3
    I was able to make it working without the second restart(i.e. unchecked, restarted, checked) Commented Mar 28, 2021 at 23:01
  • thanks i did exactly what you said and everything works perfectly Commented May 11, 2022 at 1:17
  • I disabled Docker Desktop from automatically starting when I log-in to my windows system (Windows Settings --> Search Startup Apps --> Uncheck Docker Desktop ). After this, I performed the steps mentioned above by @Alvi. It worked. Commented Dec 21, 2022 at 18:35
  • the only solution that worked for me (fresh Windows 10), thanks a bunch Commented Jan 20, 2023 at 16:57
  • I tried this a the above ones but they didn't work for me. so I tried reinstall docker and it works like a charm
    – Danh Le
    Commented Jun 20, 2023 at 7:52
22

This is followed by docker/for-win issue 487 and mostly: issue 482.

The Diagnose and Feedback menu should allow you to access the logs which are in:

 %LOCALAPPDATA%\Docker\log.txt

It will generate a zip file with said logs and other information.

The default recommendation is:

But sometimes, all the options in the "Reset" pane are grayed out.

For testing, desactivating the AV (AntiVirus) is an option (again, just to be tested).

Check also the state of your Network adapater in the device manager.

If you have a third-party network product like a VPN (for instance https://www.zerotier.com/), try and uninstall it before restarting docker.

Resetting Hyper-V could help:

Go to "Turn Windows features on or off", disable all Hyper-V related features, reboot, then Docker should ask if it can enable and reboot for you.
Let it do that and see if it's fixed. If not I'd probably try manually re-enabling Hyper-V.

Similarly:

I had a problem with most recent version. I uninstalled it, removed all docker folders and server and virtual switch from hyper-v and then reinstalled and it worked.

Check if you don't have some IP address already in use.
Finally, you can perform some Hyper-V tests.

0
18

I also ran into this "Docker is starting..." problem on Win10 Enterprise version 22H2 with Docker Engine v20.10.22

I tried all of the top-rated comments, including uninstalling and reinstalling Docker, running wsl --unregister docker-desktop and wsl --unregister docker-desktop-data, deleting the Docker and Docker Desktop folders from AppData\Roaming\ etc. However, none of the solutions worked.

Instead, what eventually worked was running wsl --update in PowerShell. Note: Docker Desktop was not running when I tried this.

3
  • 2
    Turns out I was running wsl1. wsl --update updated me to wsl2 and then Docker would start. Thanks!
    – harvzor
    Commented Jan 18, 2023 at 17:09
  • 2
    Same for me. No other above solutions worked for me. Only after running wsl --update in PowerShell Docker started running.
    – Gnanam
    Commented Jan 26, 2023 at 15:02
  • it works for me. But I was run also into issue with updating wsl. I found in logs that wsl service can't be stopped. So I closed all wsl processes and it fixed the wsl updating issue.
    – Anri
    Commented Jan 10 at 9:55
13

This is what worked for me. In my case, docker uses WSL 2 instead of Hyper-V.

  • Type optionalfeatures in Windows search and hit Enter
  • Scroll down to Hyper-V. This checkbox was selected for me.
  • Deselect the checkbox and hit OK
  • Let Windows finish disabling the feature. When completed, hit Restart now
  • After restart, docker will start automatically very quickly

Windows Features

Restart now

Docker Settings

3
  • 2
    Worked flawlessly for me. However, you have to type "windows feature" in Windows search to see the correct control panel option in the search result.
    – Udo E.
    Commented Nov 30, 2021 at 6:37
  • I would only recommend this option if your windows build version is >= 19041. Otherwise WSL 2 is not available and the suggested solution won't work.
    – Peter
    Commented Mar 21, 2022 at 8:25
  • Thanks! it worked for me. Also, this issue again comes when Windows goes on the update, the Hyper-V automatically gets enabled. Every time I deselect it to start my Docker. Commented Jul 7, 2022 at 11:05
13

None of the existing answers work for me.

  1. Task Manager > Processes tab find any Docker related process and close it with 'End task' button

  2. Task Manager > Detail tab and kill every processes that starts with wsl... and docker (specially wslservice.exe)

Now open WSL (Ubuntu icon), then Docker Desktop. You'll be prompted to start the docker engine. Click on the Start, Wait around ten seconds and everything will go back to working.

2
  • Task nanager -> services ->WslService restart worked for me.
    – Čamo
    Commented Aug 3, 2023 at 8:00
  • After crying, this worked for me. Thanks! Commented Aug 8, 2023 at 6:54
9

Work for me in powersheell in 17/10/2018

It looks like Hyper-V didn't get installed correctly either Try to remove them, then install manually to see if that helps. Make sure you run powershell as an admin

  • Disable-WindowsOptionalFeature -FeatureName microsoft-hyper-v -online
    • (wait, sometimes until now you have decided, if not, continue)
    • restart-computer
  • Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
    • restart-computer
  • Enable-WindowsOptionalFeature -Online -FeatureName Containers -All

or

  • run MOFCOMP %SYSTEMROOT%\System32\WindowsVirtualization.V2.mof in powershell
  • restarting the Hyper-V Management service
1
  • 4
    This solved my problem: Enable-WindowsOptionalFeature -Online -FeatureName Containers -All
    – pberggreen
    Commented Nov 15, 2019 at 9:56
9

For anyone on Windows 10 Home, what worked for me was running

wsl --update

Running wsl --status revealed the WSL 2 kernel file was missing from my machine and instructed me to enable the Receive updates for other Microsoft products when you update Windows option under

Settings > Update & Security > Advanced options

8

TLDR; I have made a video that demonstrates fixing this: https://youtu.be/NHfqxx12kRs

TL;

I have the following Build Info:

Edition Windows 10 Pro
Version 22H2
Installed on    ‎1/‎9/‎2021
OS build    19045.2075
Experience  Windows Feature Experience Pack 120.2212.3920.0

These steps worked for me.

Step 1: Quit Docker Desktop

If your Docker desktop is open, then Quit and exit out of docker desktop

enter image description here

Step 2: Turn Windows Features on / Off

Ensure the following as shown below

enter image description here

enter image description here

Step 3: Install Ubuntu terminal environment with WSL

Launch Microsoft Store and search for wsl or Ubuntu. Install latest version of ubuntu as shown in screenshot.

enter image description here

Step 4: Enabling Docker support in WSL 2 distros

Now, Enabling Docker support in WSL 2 distros as mentioned here. Simply run the following commands in windows terminal:

wsl.exe -l -v
wsl.exe --set-default-version 2
wsl --set-default Ubuntu-22.04

For me the console looks like this.

C:\Users\tutlinks>wsl.exe -l -v
  NAME                      STATE           VERSION
* Ubuntu-22.04              Running         2
  docker-desktop            Stopped         2
  docker-desktop-data       Stopped         2

C:\Users\tutlinks>wsl.exe --set-default-version 2
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
The operation completed successfully.

C:\Users\tutlinks>wsl --set-default Ubuntu-22.04

C:\Users\tutlinks>wsl.exe -l -v
  NAME                      STATE           VERSION
* Ubuntu-22.04              Running         2
  docker-desktop            Running         2
  docker-desktop-data       Running         2

Step 5: Launch Docker desktop

Launch the Docker Desktop and wait for the engine to start.

enter image description here

enter image description here

2
  • 2
    By far the most useful comment, I would complement this also especially when registering a linux distro with wsl: link Commented Feb 21, 2023 at 10:39
  • 1
    I have been fixing this issue for almost a week, finally I found your answer!!!
    – haojie
    Commented Sep 5 at 1:57
5

UPDATE

Looks like in Docker for Windows version: 17.09.0-ce-win33 (13620) they fixed the problem


This is an annoying problem that docker for Windows has. The latests versions have minimized it a lot but it still happens.

  1. Check if docker for Windows will start when windows starts (this is the default behavior) if not check it.
  2. Shutdown the machine. No restart. Shutdown.

Everytime you find this problem just shutdown the machine. The next time Windows boot docker will start very fast.

I know it looks esoteric but it works.

5
  • I did what you said, now instead of taking forever to do "Docker is starting..." I'm getting I keep getting The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running. Any ideas?
    – orrymr
    Commented Apr 10, 2017 at 16:11
  • Well this error is strange. I recommend you uninstall and reinstall docker for Windows. Commented Apr 11, 2017 at 16:58
  • @orrymr, you can try running Docker for Windows as Administrator Commented Oct 5, 2017 at 6:02
  • I have this problem in version 18 also Commented Jun 18, 2018 at 14:24
  • 1
    Hello @StepanYakovenko I haven't seen this issue in a while. I have Version 18.03.1-ce-win65 (17513) and Windows 10 April 2018 Update. I don't know exactly when it ceased to happen.One advice: always send the report to the docker team when this happens, I think it helped a lot to them figure out the problem. Commented Jun 18, 2018 at 20:45
5

Caution: This will delete your all existing containers

I deleted settings.json and it worked for me. (Windows 10 Home) Delete %appdata%\Docker\settings.json and let Docker to create a new one and don't forget to restart your pc

Reference to https://forums.docker.com/t/solved-docker-failed-to-start-docker-desktop-for-windows/106976/7

2
  • While this did the fix for me I also lost all my existing containers
    – Darkshifty
    Commented Mar 12, 2023 at 9:26
  • 1
    You are right i have modified my answer and added a warning about that behaviour
    – erhan355
    Commented Mar 13, 2023 at 19:29
4

Camo's solution (in https://stackoverflow.com/a/76481624/8157910 replies) worked for me: Task Manager > Services > WslService > Right-click > Restart.

Right after I did, Docker Desktop released the chain and start moving

1
3

Just solved this issue. Not sure if it would help in your case but for me it was the PATH env variable that was not set up properly. Checking the diagnostics logs I was getting "powershell not found" and "docker not found" etc

The solution for me was to add everything to the PATH environment variable:

%SystemRoot%\system32; // Stuff like bash, wsl
C:\Windows\System32\WindowsPowerShell\v1.0; // powershell itself
C:\Program Files\Docker\Docker\resources\bin; // docker-compose etc
// edit 
C:\Program Files\Docker\Docker\resources // docker itself

It might vary for your setup though

3

I had the same problem and nothing above helps. I typed

bcdedit /set hypervisorlaunchtype auto 

and after that I restart my PC. After that docker starts normally :) Finally.

2
  • 3
    you typed that where? Please provide concrete solution Commented Feb 18, 2022 at 5:12
  • windows command line
    – piatkosia
    Commented Apr 20, 2022 at 14:34
3

Restarted Docker Desktop in Admin mode and it worked for me.

3

The same problem on Win 10 Pro 22H2 (Docker Desktop 4.16.1). For me the solution was to temporary switch to Windows container and then switch back to Linux containers.

enter image description here

1
  • This is unfortunately a known bug introduced in Docker 4.16.1. Switching container types does not consistently work to solve the issue, unfortunately.
    – JohnSpeeks
    Commented Jan 23, 2023 at 23:33
3

I solved the issue by installing linux-sub-system for win 11. Open up PowerShell then run this command to see if you have installed already:

wsl -l -v

If you have this message: enter image description here

Run this command:

 wsl --install

then you will get list of valid distributions can be installed: enter image description here

Choose your distro, in my case I used Ubuntu-20.04:

wsl --install -d Ubuntu-20.04

Also needed to switch to WSL 2 links that can help:

Windows Subsystem For Linux has no Installed Distributions Error Fix

Upgrade version from WSL 1 to WSL 2

1
  • 1
    For me this fixed it, but only if I then started the Docker Desktop as an administrator
    – Danferno
    Commented Jan 30, 2023 at 14:00
3

Windows 11 Pro x64

I've tried it with Container and Hyper-V's not installed but it still didn't work.

I have Container and all the Hyper-Vs enabled then ran these 3 codes as Administrator in CMD in order one-by-one and it works:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

wsl --set-default-version 2
2

Tried all solutions presented here with no success. This is the only solution that worked for me (from issue 1825).

In PowerShell, run:

cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon
2

I installed docker 4.16.2 and faced same issue. After following through many solutions, finally updating it to 4.16.3 works for me. Here's link to issue raised on official repo and solution suggested.

Comment providing 4.16.3 release candidate: https://github.com/docker/for-win/issues/13165#issuecomment-1405161605

Release Candidate (4.16.3 exe): https://desktop-stage.docker.com/win/main/amd64/96527/Docker%20Desktop%20Installer.exe

UPDATE

You can checkout official release here: https://docs.docker.com/desktop/release-notes/#4163

3
  • This is official version now and it works fine.
    – Hrvoje
    Commented Jan 31, 2023 at 10:06
  • Yeah! Thanks for updating me @Hrvoje. I'm updating the answer.
    – Naman Jain
    Commented Jan 31, 2023 at 13:23
  • Task nanager -> services -> WslService restart worked for me.
    – Čamo
    Commented Aug 3, 2023 at 8:01
2

After I executed Docker Desktop as administrator, I got the error message, what blocked starting.

1
  • All I had to do was running it once as admin
    – Seyhak Ly
    Commented Jul 1 at 19:35
1

If your internet is running behind proxy - you should enter proxy settings in "Proxies" tab of docker's configuration window - that worked for me.

0
1

Go to Exploit Protection >Program Settings

Disable CFG of both

1.C:\Windows\System32\vmwp.exe

2.C:\Windows\System32\vmcompute.exe

1

For mine it works when I got Task Manager-> Startup->Disable Docker

Open Docker and it will run.

1
1
  1. Uninstall Docker Desktop
  2. Remove "C:\Users\Your Name\.docker"
  3. Win + R run regedit and search "...\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Docker Desktop" and delete the dir if exites
  4. clean and update wsl, run wsl --unregister ..., wsl --update and then wsl --install ...
  5. use admin open powershell and run Enable-WindowsOptionalFeature -Online -FeatureName Containers -All
  6. Install Docker Desktop and set admin
  7. Wait a few minutes, is work for me
1
  • Turning on Containers in WindowsOptionalFeature worked for me!
    – navule
    Commented Sep 17, 2022 at 20:30
1

Case 1: If one was able to run docker successfully at the start and this "Docker Desktop Starting" is occurring suddenly after unexpected shutdowns or other interruptions, this could be fixed by switching between Linux and Windows containers. ''' "C:\Program Files\Docker\Docker\DockerCli.exe" -SwitchLinuxEngine or "C:\Program Files\Docker\Docker\DockerCli.exe" -SwitchWindowsEngine.

For the first case, you can also try to stop and restart docker services or uninstall and reinstall the docker application.

Case 2: If Docker is not starting from the first time installation, this could be because you're system does not support or enabled hyper-v. Understand one thing that is hard to discover, just enabling wsl 2 as backend for docker isn't enough as wsl itself relies on hyper-v for execution. So check if you're system has hyper-v feature, if yes then enable it. If not, follow these steps to install hyper-v manually:

  1. Download the hyper-v.bat file for windows 10 Link: https://drive.google.com/file/d/1QT536aZMYSSj7rp766pv4YLpQaLcnB1F/view?usp=sharing

2: Open the hyper-v.bat file and the terminal screen will be displayed installing all hyper-v features.

3: Restart you're PC and go to Windows Features, Enable the hyper-v feature.

After this run the docker application making sure that wsl2 is already installed and updated. you're docker will be in a running state if you don't have hyper-v but you've installed and enabled hyper-v through these steps.

As hyper-v features are pre-installed in windows enterprise and above version, finding out that the root cause of docker not starting was the absence of hyper-v, took me nearly two days to research.

1

I tried most of the top answers with no solution. Ended up with uninstalling and reinstalling docker and it worked.

1
  • This also works for me. If nothing works, just uninstall and reinstall it again. Commented Dec 21, 2022 at 12:55
1

Having this issues daily since upgrading to Windows 11. Seems like WSL is very unstable, but running this command in command prompt with Admin privileges fixes it temporary.

wsl --shutdown

Not the answer you're looking for? Browse other questions tagged or ask your own question.