Reputation: 377
I am trying to run docker Desktop in my windows 10 Local. have installed it successfully but while running it I am getting the below error.
System.InvalidOperationException:
Failed to deploy distro docker-desktop to <localpath>: exit code: -1
stdout: The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
I think it is saying some windows services need to be enabled, but I don't know which service has to be enabled could someone please help me with this concern?
docker version
C:\Users\lenova>docker --version
Docker version 20.10.2, build 2291f61
Upvotes: 11
Views: 63911
Reputation: 1
If you couldn't run docker desktop with WSL even after trying all the above steps, then you can simply do that with the help of choosing Hyper-V instead of WSL. You can choose that from the popup that you get while installing docker desktop. docker-installation step
Uncheck the "Use WSL 2 instead of Hyper-V" option.
Upvotes: 0
Reputation: 6235
I did have issues with wsl not responding in Windows 10.
Get-Service LxssManager | Restart-Service
PS C:\Windows\system32> Get-Service LxssManager | Restart-Service
WARNING: Waiting for service 'LxssManager (LxssManager)' to stop...
WARNING: Waiting for service 'LxssManager (LxssManager)' to stop...
WARNING: Waiting for service 'LxssManager (LxssManager)' to stop...
PS C:\Windows\system32>
Upvotes: 0
Reputation: 131
This helped me with a lot of other docker errors after update of windows/changes in windows etc...
Upvotes: 1
Reputation: 5545
The problem is in WSL as it becomes unresponsive and returns a service error if you try the following command in PowerShell:
wsl -l -v
I believe the process can be simplified a bit more with:
This got me back up and running with Windows 10 Home (which requires WSL2) and Docker Desktop 2.4.0
Upvotes: 1
Reputation: 5545
I solved by the following steps:
Upvotes: 0
Reputation: 52646
The quality of Docker for Windows is very bad. I catch these dangerous very often.
Check list:
(1) Use this tool https://www.nirsoft.net/utils/regscanner.html . Search docker
, delete all.
(2) Remove WSL sub system, Hyper-V, then restart
(3). Create file foo.reg
has content
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog\0408F7A3]
"AppFullPath"="C:\\Windows\\System32\\wsl.exe"
"PermittedLspCategories"=dword:80000000
run.
(4) Uninstall Docker
(5) Run cmd type ...
. Delete folder .docker
Delete Docker folder in
Program Files
(6) delete
(7) Install latest version of Docker.
(8) Re-install feature WSL for Windows.
Install Ubuntu from Windows store
(9) Re-install Docker (as Administrator)
(10) Run Docker as Administrator .
Upvotes: 1
Reputation: 475
On Windows 10:
Close wsl using cmd with following command:
wsl --shutdown
Execute following start wsl again:
wsl
Upvotes: 0
Reputation: 1180
Restarting wsl worked for me.
Run the following
wsl --shutdown
, wait for it to shutdownwsl
, wait for it to startStart Docker Desktop after this.
Upvotes: 1
Reputation: 644
In my case, the issue was caused by Acrylic DNS server. Anything that holds port 53, would be a problem.
Interesting that it all worked fine for a few days after installation, maybe because I did not reboot the laptop all that time, only used the deep hibernation. So it was hard to guess what could break the docker setup, I was sure that it was because of the recently installed windows or docker updates.
Upvotes: 0
Reputation: 41
This worked for me: https://github.com/MicrosoftDocs/WSL/issues/547#issuecomment-873540236
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog\0408F7A3]
"AppFullPath"="C:\\Windows\\System32\\wsl.exe"
"PermittedLspCategories"=dword:80000000
Upvotes: 1
Reputation: 65
I had the PgAdmin 4 app running, and when I closed it and tried starting Docker Desktop again it booted normally.
Not sure if there is a link, but an easy solution to try.
Upvotes: 1
Reputation: 167
I had to exit Private Internet Access (PIA) VPN to get docker to work on my system. Not sure why.
Upvotes: 1
Reputation: 132
If you don't need to run Linux and Windows containers side-by-side, an option is to turn off the WSL and use Hyper-v instead. This should work fine.
Upvotes: 0
Reputation: 189
run as administrator , and you switch the container to windows by clicking the icon bar in the right corner taskbar and choose switch to windows container
Upvotes: 1
Reputation: 2385
In my case, I was getting a similar error. This was happening because Docker desktop didn't have permissions to access the path C:\Users\Adithya\AppData\Local\Docker\wsl\distro
. This started happening after I switched to WSL2 backend.
The solution was to kill all docker process. Next, Run Docker Desktop as Administrator
.
System.InvalidOperationException:
Failed to deploy distro docker-desktop to C:\Users\Adithya\AppData\Local\Docker\wsl\distro:
exit code: -1 stdout: The operation timed out because a response was not received from the virtual machine or container.
Upvotes: 0
Reputation: 195
Almost sure, that the accepted answer will work. However, it won't be an option, if you utilize WSL for other purposes as well. In that case, you may have several configurations/apps in WSL and just reinstalling or deleting your configuration will probably be a bad solution.
Furthermore: WSL is not the issue for this error! It is created by Docker engine configuration which will kill the WSL service (LxxsManager
). This may happen because of
You can find a detailed discussion about this issue on Docker's GitHub Issues.
I personally experienced this problem after installing updates on Windows while running Docker v3.5.2. And again, reinstalling/killing WSL is not an option for me! So I tried to kill all services (Docker and WSL) and update Docker. Unfortunately that did not work in first place, since LxxsManager
was in some weird state and I could not even kill it any more (even a kill command as admin with force switch did not do it's job!)... So here is my solution to fix that problem:
Note: Since I did not change Docker configuration, I installed an update. If you changed configuration options resulting in that crash, your solution may be different. Literally, instead of updating Docker (step 3) you would probably roll back your Docker configuration changes instead.
Upvotes: 6
Reputation: 485
Try delete %USERPROFILE%/.wslconfig
. If it helps then you can try to modify it so that it work. As for me I deleted the file, because on my workstation docker didn't want to work with it
Upvotes: 9
Reputation: 141
Right click on docker icon, run as administrator (if you have administrator rights on your computer). It solved the problem for me.
Upvotes: 14
Reputation: 304
Upvotes: 16