Search code examples
dockerdocker-desktop

Docker Desktop will not start


I am helping a co-worker who had his Docker Desktop app just stop working about a week ago. When he tries to run it he gets this error:

The system cannot find the file C:\Program Files\Docker\Docker\Docker Desktop.exe

It is really confusing, because that is the exact file we are running! It is there! Even when we run Docker Desktop.exe from a command line in the C:\Program Files\Docker\Docker folder, it still gives the same error (saying it cannot find the file). But clearly the file is there!

(Note that this is NOT the same error you get when you try to run a non-existant file. That would be 'filenamehere.exe' not recognized as an internal or external command)

Things we have tried:

  1. Reboot
  2. Uninstall and re-install Docker Desktop
  3. Turn off and then turn back on the Docker Windows Service.
  4. Move C:\Program Files\Docker\Docker\Resources\bin to the top of the PATH environment variable.
  5. Add C:\Program Files\Docker\Docker to the PATH environment variable (and move it to the top).
  6. Checked to see if Docker Desktop.exe is a symlink that has its target missing. (Via dir /al /s)

I just can't think of anything else that would cause this kind of error.

What can we do to fix Docker Desktop?


Solution

  • Turns out it was due to Windows Subsystem for Linux 2 (WSL 2) not being excepted from the virus checker. Once that was done, reinstalled and rebooted, it all started working fine.