I have installed Docker Desktop version 4.4.4 and it is not running. It only displays "Docker Desktop Starting ..." but never starts running.
I have tried so many ways but didn't solve:
Allowing the following files in windows firewall C:\program files\docker\docker\resources\vpnkit.exe, C:\program files\docker\docker\com.docker.service C:\program files\docker\docker\resources\com.docker.proxy.exe
Removing 'Docker' and 'Docker Desktop' folders from AppData/Roaming and AppData/Local
Uninstalling and reinstalling Docker with different versions including 4.5.1
The main problem is WSL2 does not auto install the kernel when WSL2 installs, yet Docker Desktop expects it already installed. So, fully close & stop Docker as other answers have said, then run this cmd as admin:
wsl --update
Now open Docker Desktop & it should start up ok.
I've found out another symptom leading to the solution is also related to WSL.
On one side, Docker service won't start throwing this error:
error during connect: This error may indicate that the docker daemon
is not running.: Get
"http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version": open
//./pipe/docker_engine: The system cannot find the file specified.
And on the other, WSL is unresponsive. Attempting to run a WSL Distro or WSL command directly on CMD, won't return any output at all. It will just hang in there.
So the solution is common to WSL and Docker.
I've found in a question regarding the WSL issue, that the LxssManager Windows service is staled (it may show under services.msc as Stopping and all the buttons are greyed out, or I've even seen it Running apparently, but with the Docker and WSL issues above, so something is wrong with it still.)
First, we have to get LxssManager PID in order to kill it. Using an elevated shell, we can get it this way:
sc queryex LxssManager
Having the PID, we can kill the process but beware I wasn't able to kill it using kill or taskkill commands. I was getting the following error:
ERROR: The process with PID XXXXX could not be terminated.
Reason: Access is denied.
To effectively kill the process, do as following:
wmic process where ProcessID=XXXXX delete
Replace XXXXX with PID, of course.
Having done so, start the LxssManager service:
net start LxssManager
A word of warning:
I've noted in some cases this is not enough for unknown (to me) technical reasons even if LxssManager service is shown as Running.
Just repeat the above steps! Sometimes it works doing this once, sometimes doing it twice for some reason.
TL;DR
Kill LxssManager Windows service using wmic+PID.
Start LxssManager service.
Repeat twice or more if issues persist.
Docker and WSL issues are solved.
Here i am using Windows platform, I faced this issue.
And to resolve this issue follow the below steps.
Just delete the temporary files from the following.
C:\Windows\Temp
C:\Users{yourAccountName}\AppData\Local\Temp
C:\Windows\Prefetch
then
Uninstall Docker Desktop
Restart computer
before installing docker, make sure you have Ubuntu WSL(download from Microsoft store)
[optional] If you need Terminal Preview(multi-terminal) download from Microsoft Store. Great Terminal
Install Docker Desktop Again
Thanks
For me, it was a problem with WSL. When I tried:
wsl --install -d Ubuntu
in a command window, after a few minutes I got error 0x80370114
The fix was to do:
Exploit Protection > System Settings > Control Flow Guard
turn on
restart computer
Then reinstall/restart Docker Desktop, and it works!
Hope this helps someone else
I was facing same code for for Docker version 4.*. For me it was Visual Studio code,
Stopped WSL form Task manager
stopped Docker which was showing "Docker desktop is starting" form Task manage
stopped Visual Studio code form Task manager
Started Docker again
These steps placed my Docker in Running state in 30 seconds
Hope this helps someone!
Solved this issue with #Alvi answer
Docker forever in "Docker is starting.." at Windows task
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
My fresh install was experiencing the same symptoms. Also wsl --list showed "no installed distributions". I tried many reinstallations and restarts of Docker and WSL, but eventually found the steps:
In Task Manager, kill all processes related to Docker & Docker Desktop
Run Docker Desktop as administrator
Got it working on on Windows 11 Enterprise.
for me it worked in windows (docker desktop):
to uninstall the docker
reinstall as administrator
don't select the part with wsl
As wrote here, you need to do:
wsl --update
But after that it doesn't fix my issue until I did restart to my pc.
What worked for me was to log in into the Docker (upper right corner), but when I first clicked on login, it said "exec: "rundll32": executable file not found in %PATH%" - I search and found that I need to check environmental variable in PATH that I have "C:\WINDOWS\system32" there - (and in my case I really had it broken somehow - don't know why, but I missed backslash between Windows and system32). So I fixed to correct path, restarted PC. Then I was able to login. And immediately "Docker Desktop Starting..." was gone.
I use Docker with PyCharm. I ran into this problem when I launched PyCharm and Docker Desktop at about the same time.
On my machine Docker Desktop starts automatically when I boot. I can avoid the problem by waiting for Docker Desktop to finish starting. And then start PyCharm.
I was also having the same problem, just a few minutes ago.
Platform:
Windows 10 Pro - 22H2 - Build 19045.2486
Windows Updates newly installed: KB5022282, KB5020876, KB5012170
What i did was: Activating the Windows Hypervisor Platform
And it did solve the problem, atleast for now
In my case it helped me to enable the CPU SVM (Support Vector Machine) function in my BIOS settings.
Also, if you have this feature disabled, you will not be able to use Virtual Box either.
SVM in BIOS
got to services and stop Docker desktop service and start again
reopen Docker desktop it will work
wsl -v
if it show version then linx is install
search windows programer feature in your laptop
enable virtulization
wsl --set-default-version 2
restart laptop and then start docker and wait for 2 minutes your docker will start working
I am running windows 11, visual studio 2023 and had this issue.
First, open a command prompt and type
wsl.exe --list --online
Then enter following
wsl.exe --install Ubuntu-20.04
Then type in the prompt sudo apt update to update the distribution. Lastly, start up Docker desktop and log in (you can register at their site). That fixed Docker on my pc.
When I am trying to built docker app, I am getting below error. Command I am running is docker build -t node_curd_exe .
error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=h3q9gxeprezyco28agiqe9jp2&shmsize=0&t=node_curd_exe&target=&ulimits=null&version=1: open //./pipe/docker_engine: 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.
Anything else I can do ?
I have encountered this problem myself. My problem was that I had configured Docker Desktop to not run at startup. As long as Docker Desktop is not running, you will not have the Docker daemon running, hence the error.
Quickly check whether you have a white whale in your taskbar before trying any more exotic solutions.
Try this:
"Hardware assisted virtualization and data execution protection must be enabled in the BIOS"
Typically, this problem is due to a disabled Hyper-V or because the hypervisor agent is not running.
Open a Windows shell as administrator and enable Hyper-V with:
dism /Online /Enable-Feature:Microsoft-Hyper-V /All
Reboot your machine and see if Docker for Windows starts.
If the above doesn't work, open a Windows shell as administrator and enable the hypervisor with:
bcdedit /set hypervisorlaunchtype auto
If Docker for Windows is still not working properly, try the following additional solutions, which are based on instructions extracted from this Docker for Windows issue thread.
Reboot your machine and see if Docker for Windows starts.
Copy this path: Control Panel\Programs\Programs and Features into a File Explorer address bar.
Click Turn Windows feature on or off on the left side of the Control Panel.
Clear the Hyper-V check box in the list of Windows features.
Reboot your machine and start Docker for Windows (or reinstall if necessary). If the above doesn't work, then Virtualization Based Security (VBS) might be interfering and needs to be disabled. Try the following to disable VBS:
Open the Local Group Policy Editor (gpedit.msc)
Go to Computer Configuration\Administrative Templates\System\Device Guard
Disable VBS.
I had a similar issue : Docker Desktop was configured to run Linux containers but my Visual Studio project targeted Windows containers.
So after launching Docker, I right-clicked the whale (was red) in the taskbar's tray and selected the 'Switch to Windows containers' menu item.
An error message showed up talking about 'Deny write access for fixed drives not protected by Bitlocker' which was fixed by launching a regedit and putting a 0 for the following key : Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Policies\Microsoft\FVE\FDVDenyWriteAccess
Then repeating the tray action finally worked and the whale turned to white.
Open PowerShell as Administrator and run:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
try this on your CMD:
docker-machine create box
docker-machine env box
this issue still open
What solved in my case, on Windows 11, was to turn off Hypervisor and Windows Subsystem for Linux, reboot and turn on again.
I continue to get the following error when trying to start docker on Windows 10 pro. my HyperV is turned on and running:
Version 18.04.0-ce-win62 (17151)
Channel: edge
e0a85f6
Any help would be appreciated!
Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Hyper-V encountered an error trying to access an object on computer 'C001715587' because the object was not found. The object might have been deleted. Verify that the Virtual Machine Management service on the computer is running.
at New-Switch, : line 117
at , : line 394
at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Core\pipe\NamedPipeClient.cs:line 36
at Docker.Actions.DoStart(SynchronizationContext syncCtx, Boolean showWelcomeWindow, Boolean executeAfterStartCleanup) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 75
at Docker.Actions.<>c__DisplayClass15_0.b__0() in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 59
at Docker.WPF.TaskQueue.<>c__DisplayClass19_0.<.ctor>b__1() in C:\gopath\src\github.com\docker\pinata\win\src\Docker.WPF\TaskQueue.cs:line 59
You may need to fix your "Control Flow Guard" settings for vmcompute.
(Be aware that CFG is an exploit-protection mechanism, so pay attention when changing it and understand why it exists.)
Open Windows Security
Open App & Browser control
Click Exploit protection settings
Switch to Program settings tab
Locate C:\WINDOWS\System32\vmcompute.exe in the list and expand it
Click Edit
Scroll down to Control flow guard (CFG) and uncheck Override system settings
Start vmcompute from powershell net start vmcompute (or alternately start the Hyper-V Host Compute Service from the system Services app)
Restart PC
Open Hyper-V as Administrator
Connect to Server, Local computer, OK
The above worked for me when I couldn't run docker, then I realized I couldn't connect to my local machine on hyper-v. This is what finally worked.
Try this. It's sorting the problem of many people.
cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon
I tried to run it from C:\Program Files\Docker\Docker\Docker Desktop.exe
And it worked.
Also, one more thing I added is I kept the Cisco AnyConnect VPN service running (although none of the VPNs were connected). I know this point sounds weird but I thought to share it.
If You, like me, already have an installed wsl2 distro on Your system (at the time You install Docker Desktop) and all the answers above did not help, than look if Your distro is actually running by hitting the command wsl -l -v
wsl -l -v
NAME STATE VERSION
* Ubuntu-20.04 Running 2
docker-desktop Running 2
docker-desktop-data Running 2
If so, then shutdown Your wsl instance by running wsl -t Ubuntu-20.04 this fixed the issue on my system. Docker Desktop window came immediately up after the wsl instance was down.
I think the problem is that I already have a docker installed in this wsl instance.
If you facing
Unable to stop Hyper-V VM: Service 'Hyper-V Host Compute Service
(vmcompute)' cannot be started due to the following error: Cannot
start service vmcompute on computer '.'.
this error then follow the steps:
Open "Window Security"
Open "App & Browser control"
Click "Exploit protection settings" at the bottom
Switch to "Program settings" tab
Locate "C:\WINDOWS\System32\vmcompute.exe" in the list and expand it
Click "Edit"
Scroll down to "Code flow guard (CFG)" and uncheck "Override system settings"
Start vmcompute from powershell "net start vmcompute"
The fix for me was to enable virtualisation in my bios. It'll be in Advanced > CPU Configuration > SVM - make sure it's enabled
I'm trying to run docker on windows 10 Pro but I get this error: "Hardware assisted virtualization and data execution protection must be enabled in the BIOS"
I have already enabled "Intel VT" and "XD bit" in BIOS settings As I read in this post "Enable Hardware settings in BIOS to run Hyper V" but I don't have "Intel VT-d" and "Trusted Execution" in my BIOS settings to disable them.
These are my system specifications:
OS: Windows 10 Pro build 14393.447
CPU: Intel Core 2 Duo E7500
Main: DG43GT
I have done the things said in this post "Docker for Windows error" but nothing works!
I would really appreciate it if someone could help me with this problem.
Thanks
After installed docker, on hp pavilion power 15-cb0xx
I got the same error:
Case 1: First I run these two commands with admin permission and restart the system but After the restart, I got the same error.
dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All
bcdedit /set hypervisorlaunchtype auto
After checking the Windows feature as you see on the Image the second option
(HyperV-Platform) checked but looks different(pale-> disabled by default).
You cannot enable or disable directly. You only able to update via PowerShell with first two commands I mentioned in Case 1.
After Case 1: it looks checked however the error was there.
Case 2:
Turn off all the Hyper-V feature
Open the bios setting re-enable the Hyper-V feature
Check the Hyper-V. It should look like:
Re-Install docker
Hyper-V on Windows 10 needs Second Level Address Translation (SLAT). This may not supported by this cpu. You can check this by using the sysinternals util coreinfo
I was trying Docker Desktop for Windows on a VM with Windows 10 Enterprise evaluation.
This is the error that I get:
I've searched round here but I haven't found nothing usefull. I have opened the log file and found error message like:
Failed to setup server socket listening on hyperv-connect://... Failed
to contact the database on \.\pipe\dockerDataBase.... File not found
Unable to write to database (continue like image above)
Nobody have idea? I've accepted the initial prompt when Docker asks me if I want to enable the Hyper-V feature and restart the computer after activation. Could it be a problem of nested virtualization?
I had the same problem and I solved it after I executed this command on a Powershell window:
bcdedit /set hypervisorlaunchtype Auto
I also had to enable CPU virtualization on the hardware properties of the virtual machine (I'm using VMWare vCenter, that might not be needed in your case)
The problem was the nested virtualization. Docker for Windows use Hyper-V behind the scene, Hyper-V was on the host machine too, so there's two nested virtual machine.
The steps are:
Create virtual machine named Docker (the one where Docker will be installed on) without dynamic memory allocation
Open Powershell and Set-VMProcessor -VMName "Docker" -ExposeVirtualizationExtensions $true
Install SO and Docker for Windows as usual
Be aware host machine and guest machine must share the same build number and both needs to be a Windows 10 or Windows Server 2016.