Why won't Docker Desktop Start
Asked Answered
P

9

16

I am trying to install Docker Desktop for Windows and once I have completed the entire process as mentioned in their official documentation, including installing and enabling the wsl 2 on Windows. However, when I try to launch the application, nothing happens except for a process showing up in the task manager. Even the taskbar icon is not coming up. I have already browsed for information regarding this issue and tried the following solutions, but to no avail:

  1. Reinstalling Docker Desktop
  2. Removing the settings.json file in %APPDATA%\Roaming\Docker
  3. Running Docker Installer as Administrator
  4. Checking the WSL Feature in Windows Features is on.
  5. Installing an older version of Docker, on which the same issue persisted

System Specifications:

  • Dell Inspiron 5521 running Windows 10 Pro (Version 21H1, Build 19043.1826)
  • Intel i7 3rd gen processor, 16GB RAM
  • Docker version 20.10.17, build 100c701

This is the log file generated: Docker generated Log file

Can someone please guide me regarding this?

Edit: When I installed docker on my friend's computer, and running the wsl -l -v command, he gets 3 entries namely Ubuntu, Docker desktop and docker desktop data, but on my pc it is only showing Ubuntu.

Position answered 23/7, 2022 at 5:49 Comment(8)
@JRichardsz Anyhow, if you have ever installed docker for windows, could you guide me for a clean installation, including proper uninstallationPosition
It would be a pain the installation. In some cases, bios changes are required. I advice to install a vmbox with ubuntu server (without ui). You could have docker in 2 minutes with just one click gist.github.com/jrichardsz/… Also you could use Linux instead windows.Ordinate
If you choose linux in the hole system or in a vmbox, I would be glad to help you github.com/jrichardsz/contact_me/discussionsOrdinate
@JRichardsz, I don't think my laptop will be able to handle running a docker container in vmbox. Plus I need to install docker to run flytsim, which is a drone simulator and so the same problem is there since I have a 3rd gen i7 processorPosition
I've had similar issues that are resolved by running Docker Desktop itself (not the installer) as an administrator. It doesn't seem to detect it needs to and prompt for credentials automatically if you run as a standard user and elevate to an administrative account when needed. When I right click on the Docker Desktop shortcut and click Run as Administrator, it works though - does that work for you?Calve
@Calve nope, I've tried running the application as an administrator, but still same issue persists. However, I am not running it via a shortcut but from my start menu, although I don't think it would make much of a differencePosition
common/cmd/com.docker.backend/main.go:94 +0x25 [2022-07-23T05:32:38.131207600Z][com.docker.backend.exe][F] exec: "powershell": executable file not found in %PATH% This message appears several times in the logs. Is powershell.exe available on the %PATH% and functional?Suds
@Suds Thank you so much, that was the case, somehow I deleted that entry, docker is launching nowPosition
S
3
common/cmd/com.docker.backend/main.go:94 +0x25 [2022-07-23T05:32:38.131207600Z][com.docker.backend.exe][F] exec: "powershell": executable file not found in %PATH%

This log message suggest the absence of a functional powershell on the Path. After fixing this Docker Desktop should start.

Suds answered 26/7, 2022 at 14:41 Comment(0)
P
6
  1. Install WSL 2:

    • Follow the official steps on how to install WSL 2 at Microsoft Docs.
  2. Update WSL:

    • Open PowerShell and run the command:
      wsl --update
      
  3. Uninstall Docker:

    • If you have Docker installed, uninstall it.
  4. Delete Temporary Data:

    • Delete the following folders:
      • C:\Users<USER>\AppData\Roaming\Docker
      • C:\Users\ProgramData\Docker
      • C:\Users\ProgramData\DockerDesktop
  5. Reinstall Docker:

    • Reinstall Docker, and make sure to tick the option for WSL during the installation.
  6. Restart Computer:

    • After installing Docker, restart your computer.
  7. Run Docker as Administrator:

    • Find Docker in your programs and run it as an administrator.
  8. Run PowerShell as Administrator:

    • Open PowerShell and run it as an administrator.
  9. Switch to Docker Daemon for WSL:

    • Run the following command in PowerShell:
      & 'C:\Program Files\Docker\Docker\DockerCli.exe' -SwitchDaemon
      
    • If it doesn't work, you may need to run the above command one or two more times.

That's it! These steps should help you fix the problem.

Edit:

I've encountered the same problem again, which turned out to be related to my DNS settings. Initially, I was using NextDNS, but the problem was resolved after I switched to Cloudflare.

It's peculiar behavior from NextDNS, as I had not set up any blocking rules. However, upon reviewing the Docker engine logs, I noticed it was attempting requests to the Docker servers, which appeared to be blocked or unfulfilled when using NextDNS (although NextDNS didn't log any blocked queries, which is odd). Consequently, the Docker engine would get caught in an infinite loop during startup, continuously trying to complete these requests.

Peeper answered 11/9, 2023 at 18:51 Comment(2)
ProgramData is at the drive root so C:\ProgramData not C:\Users\ProgramDataSapphirine
Just updating WSL by command wsl --update worked for me. Docker engine successfully started.Intosh
S
3
common/cmd/com.docker.backend/main.go:94 +0x25 [2022-07-23T05:32:38.131207600Z][com.docker.backend.exe][F] exec: "powershell": executable file not found in %PATH%

This log message suggest the absence of a functional powershell on the Path. After fixing this Docker Desktop should start.

Suds answered 26/7, 2022 at 14:41 Comment(0)
R
3

It might be because an instance of Docker Desktop is running in the background, try opening you Task Manager/Activity Monitor, searching for "Docker Desktop", then quitting all of those processes.

Raki answered 13/11, 2023 at 10:7 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Edema
M
1

As this is one of the main Google hits for "Docker Desktop doesn't start", let me also add another potential solution here for future readers: your user was not added to the docker-users group yet. As explained in the Docker installation documentation, if the current user is not an administrator, the current user must be added to the docker-users group for Docker to work.

Melcher answered 4/9, 2023 at 9:29 Comment(0)
P
1

I've tried This ways that i searched in Q&A forums and communities :

  1. checked my BIOS Setup for Virtualization Setting
  2. Install Hyper-V feature(in Win11 named Hypervisor)
  3. trying to Reinstall & Update WSL
  4. Delete %AppDate% files of Docker
  5. Reinstall Docker
  6. Starting Docker and Hyper-v Services Manually

But the final way that helped me was:

installing lower version of Docker instead of latest version(I've installed 4.12 instead 4.27)

and it finally properly worked

Pussy answered 4/2 at 17:4 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Boris
H
1

For future readers, yet another possibility that I just had to figure out from hours of trial and error: If you're using a custom WSL2 Kernel, it might be the cause for docker-desktop woes.

I was originally using Podman that was running just fine on custom compile of WSL kernel but turns out Docker really didn't like it. There was no obvious error but removing that one line pointing WSL (in %USERPROFILE\.wslconfig) to my custom kernel fixed the issue.

Hope it saves future searchers, some time.

Homeomorphism answered 29/5 at 15:43 Comment(0)
T
0

I faced the same issue where once I open the docker desktop in admin mode, it was not opening(tried restarting and opening it again but the issue still remained the same) and in services docker desktop was not running, I tried starting it in services and then try to open but nothing worked for me.

The solution that worked for me is: I have deleted below folders in my machine

  1. C:\Users<username>\AppData\Roaming\Docker
  2. C:\Users<username>\AppData\Roaming\Docker Desktop

After deleting the above folders I have restarted my machine and tried to open docker desktop in admin mode and it worked

Tirado answered 24/3 at 22:6 Comment(0)
T
0

For those encountering this problem in 2024, this issue cropped up after I attempted to upgrade Docker Desktop by clicking the "New version available" notification in the status bar...Big mistake!

Because I didn't want to destroy my containers, and felt in my gut, that the solution would not require such drastic action, I tried a few "non-destructive" fixes that didn't work, but was finally able to get Docker Desktop working again without blowing away my current install.

Note: Steps 1-4 were performed after the initial "prompted upgrade", which when started, would throw an actual error that suggested that the upgrade did not properly complete, or was corrupted. Steps 5-8 were performed after I downloaded and reinstalled OVER the "corrupted" upgrade, and the app would just silently fail after starting.

If you're NOT receiving an actual error message, but the app just "silently fails" after attempting to start, my suggestion would be to first try skipping to step 5, before reinstalling over your current instance. And if that doesn't work, start over at step 1...Just a suggestion.

  1. Download the install the current exe for your version, from the Docker web site.
  2. In Task Manager, kill all Docker processes
  3. Run the install to re-install Docker OVER the currently installed instance (Again, I did not uninstall beforehand, because I wanted to keep my containers, but your mileage may vary)
  4. Initially, after this step, Docker Desktop successfully started with my containers intact...UNTIL, I restarted my laptop. When I attempted to restart Docker Desktop after the restart, the app would start, but when it prompted me to start a service dependency, it would then stop, and just silently fail, but background processes would still be running in Task Manager. If this is your experience, continue with following steps...
  5. In Task Manager, kill all Docker background processes
  6. Backup %AppData%\Roaming\Docker\settings.json
  7. *** THIS IS THE KEY *** DELETE %AppData%\Roaming\Docker\settings.json -Docker Desktop will automatically recreate this file when restarted).
  8. Restart Docker Desktop as an Admin and your containers/data/settings should still be intact, and everything should work as expected.

Caveat: I have not rebooted my system yet, as I've burned too much time on this today, and reboot takes too long, so the issue could possibly recur once I reboot.

Good luck!

Termagant answered 2/8 at 13:45 Comment(1)
Update - This issue recurred, and rather than going through the whole process of reinstalling Docker Desktop, I decided to try just backing up/deleting the settings.json file...Worked like a charm! So, I recommend trying THAT first, if Docker Desktop "silently" fails when you try to start it. Also, I've got it configured to run at startup, and this issue recurred after a warm reboot, so it might be related to that.Termagant
D
0

For those who still have the problem, what solved it for me was that I uninstalled Docker and reinstalled it, when installing I unchecked the option to install the required Windows components for WLS 2

Dahomey answered 4/8 at 15:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.