user3552342
user3552342

Reputation: 707

Not able to start docker Desktop in Windows

I am not able to start the Docker container in Microsoft Windows 10 profession. As I found the cause of this error is due to the docker engine is failing to start.

After installing docker I am able to run only the docker version command.

-> docker --version

As I found the error which is showing docker daemon is not running in windows while running any other docker commands on CMD.

I also enabled (checked) the Hyper-V option in "Turn Windows features on or off" in the Control panel -> Programs -> Turn Windows features on or off.

enter image description here

Upvotes: 20

Views: 77887

Answers (11)

kishan maharana
kishan maharana

Reputation: 557

I had also faced the same error. but for me, I fixed this by following steps.

  • Quit your docker desktop completely.
  • Restart your system if possible ( optional ).
  • Run docker desktop app with admin rights.

Upvotes: -1

BIBIN S
BIBIN S

Reputation: 11

Please make sure your OS type requires WSL or Hyper-V to run docker as per this official link : https://docs.docker.com/desktop/install/windows-install/

For my case, I am using Windows 11 Home OS, and it requires WSL (Windows Subsystem for Linux) to run docker. So that I installed WSL on my system.

  1. Follow this link to install WSL: https://learn.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package
  2. After that restart your system, then open docker (It may take up to 10 secs to start)

Upvotes: 0

Amuk Saxena
Amuk Saxena

Reputation: 1571

I ran the following command which resolved the issue for me.

wsl --unregister docker-desktop

Upvotes: 0

Mike Menko
Mike Menko

Reputation: 1049

Using PowerShell gave me a right direction. All restarts and re-install with deletion didn't work.

wsl -l -v showed list of three processes but wsl -t docker-desktop responded with "There is no distribution with the supplied name." only. wsl --shutdown either didn't work. Solution is next door wsl --unregister docker-desktop . After this all went fine.

Upvotes: 0

Artem Ivashkin
Artem Ivashkin

Reputation: 11

Just share my experience how I solved the problem with "docker failed to start" or similar problem. I found some mess with my Win10 Home edition, despite the fact that all checkes regarding Hyper-v, wsl and others passed I got failed to start docker engine. So, I tried to install one of the old version (4.4.4), not the newest one. An voila it installed wsl2 and started without any problems! Hope this could help someone who's tried all solutions (for example, deletion of the %appdata%\docker folders) :)

Upvotes: 1

Igor V
Igor V

Reputation: 37

You should check WSL:

Execute "wsl -l -v" at the command prompt.

If the result is like this:

wsl -l -v

Then execute "wsl --shutdown" on the command line.

Then execute "wsl -l -v", you will see:

wsl -l -v

Then start Docker Desktop.

This solved my problem.

Upvotes: 2

Rajan Chauhan
Rajan Chauhan

Reputation: 511

I was getting the same exact issue and a solution was provided from thread The attempted operation is not supported for the type of object referenced." error after Windows Update fixed my problem. I had tried everything before this solution. To keep it simple just follow the below steps -

  1. Copy below snippet

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog\0408F7A3] "AppFullPath"="C:\Windows\System32\wsl.exe" "PermittedLspCategories"=dword:80000000

  1. Save it as a file wsl.reg
  2. Execute the file to update the wsl registry
  3. restart docker desktop

these steps are basically done to do some changes in the registry of wsl distribution that is installed standalone or by docker.

Upvotes: 0

vladik
vladik

Reputation: 131

My Docker Desktop failed to start after I forced it to exit while updating (it stuck during the update that's why I had to do it). No solution on the Internet helped me until I ran into this Powershell command:

wsl -l -v

It listed the following:

* Ubuntu-18.04           Stopped         2
  docker-desktop         Uninstalling    2
  docker-desktop-data    Stopped         2

It kept saying "Uninstalling" even after rebooting the whole system.

What I did was:

wsl -t docker-desktop

It terminated docker-desktop and made the problem gone.

Upvotes: 13

user3552342
user3552342

Reputation: 707

The error is related to the daemon part:

In the default daemon configuration on Windows, the docker client must be run elevated to connect.

We can switch the Docker daemon as an elevated user in order to run the docker daemon in the Windows professional:

Run below command with Windows Powershell as administrator:

Run the PowerShell command: -

& 'C:\Program Files\Docker\Docker\DockerCli.exe' -SwitchDaemon

OR

You can run the below command on CMD as administrator:

Run the CMD command: -

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

Upvotes: 42

Ankit Kumar
Ankit Kumar

Reputation: 353

delete %appdata%\Docker\settings.json and let Docker to create a new one

Upvotes: 7

Saksham Sharma
Saksham Sharma

Reputation: 19

Make sure to download the Linux Kernel Update Package and then try restarting Docker Desktop.

Download from here

Upvotes: 1

Related Questions