Reputation: 707
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.
Upvotes: 20
Views: 77887
Reputation: 557
I had also faced the same error. but for me, I fixed this by following steps.
Upvotes: -1
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.
Upvotes: 0
Reputation: 1571
I ran the following command which resolved the issue for me.
wsl --unregister docker-desktop
Upvotes: 0
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
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
Reputation: 37
You should check WSL:
Execute "wsl -l -v"
at the command prompt.
If the result is like this:
Then execute "wsl --shutdown"
on the command line.
Then execute "wsl -l -v"
, you will see:
Then start Docker Desktop.
This solved my problem.
Upvotes: 2
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 -
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog\0408F7A3] "AppFullPath"="C:\Windows\System32\wsl.exe" "PermittedLspCategories"=dword:80000000
these steps are basically done to do some changes in the registry of wsl distribution that is installed standalone or by docker.
Upvotes: 0
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
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
You can run the below command on CMD as administrator:
Run the CMD command: -
"C:\Program Files\Docker\Docker\DockerCli.exe" -SwitchDaemon
Upvotes: 42
Reputation: 353
delete %appdata%\Docker\settings.json and let Docker to create a new one
Upvotes: 7
Reputation: 19
Make sure to download the Linux Kernel Update Package and then try restarting Docker Desktop.
Upvotes: 1