shubham salunke
shubham salunke

Reputation: 475

Why won't Docker Desktop Start

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:

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.

Upvotes: 30

Views: 112617

Answers (15)

Andrew Thompson
Andrew Thompson

Reputation: 11

I had this issue and there was an old legacy docker backend process running in task manager. I ended that process and then docker desktop launched on the next try.

Upvotes: 1

mathematics-and-caffeine
mathematics-and-caffeine

Reputation: 2169

Try to start it as an administrator. This fixed it for me.

Upvotes: 0

Maverik
Maverik

Reputation: 5671

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.

Upvotes: 0

rexsuecia
rexsuecia

Reputation: 399

Here are another 5c,

I had added non-Json to my ~/.docker/config.json that made the start fail rather silently, though there were hints in the log ('C:\Users<username>\AppData\Local\Docker')

Upvotes: -1

Alessio
Alessio

Reputation: 139

  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:\ProgramData\Docker
      • C:\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.

Upvotes: 13

Frederico Portela
Frederico Portela

Reputation: 131

I was having a similar issue (on windows fyi). On startup I could open the app but after closing it I wasn't being able to start it up again. For me the issue was I was just exiting the app (obvious way: clicking on the red cross) but by doing that the docker engine seemingly kept running on the background. Going in to task manager I saw:

enter image description here

So I had to manually end those tasks and then I was able to start Docker again.

In order to avoid these task manager steps you can, when in the app and want to close it, click on the 'Quit Docker Desktop' icon, usually located at the bottom-left side of the screen, it will also stop any background processes:

enter image description here

Upvotes: 4

killer47
killer47

Reputation: 19

This is because Docker and Docker Desktop instances are already running in your system's background process.

Open task manager and search for Docker. Right-click on them and click end task. After that run the Docker Desktop application and now it will run smoothly.

Upvotes: 0

Aadi Adgaonkar
Aadi Adgaonkar

Reputation: 85

I have tried every approach under the sun for the past two weeks, trying to get this thing to work. I purged all mentions of Docker from my PC files, updated my WSL, restarted my computer a billion times, and nothing worked.

The only approach that ended up solving my problem was downgrading to a far older version (4.24.0). I'm guessing there's some bug in the code that just doesn't let docker work on some aspect of my setup.

If you're in a situation like I was in, just try uninstalling your current version through the Windows uninstall apps page and then installing an old version from here: https://docs.docker.com/desktop/release-notes/

Upvotes: 0

Jearvarldor
Jearvarldor

Reputation: 1

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

Upvotes: -1

TWebby
TWebby

Reputation: 41

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!

Upvotes: 0

manjunath kuruba
manjunath kuruba

Reputation: 1

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

Upvotes: -1

SepehrShojaee
SepehrShojaee

Reputation: 7

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

Upvotes: -1

Timmy McCormack
Timmy McCormack

Reputation: 99

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.

Upvotes: 9

user2842685
user2842685

Reputation: 324

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.

Upvotes: 7

DrHopfen
DrHopfen

Reputation: 837

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.

Upvotes: 3

Related Questions