'Docker for windows will not start

I have installed Docker for windows as a complete noob looking to try it out. I have ensured Hyper-V is enable, virtualisation is enabled also

any time I try and run the docker desktop the whale icon is red and it states that it could not start, and if I try to run a command like from cmd I get teh following error

error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/images/json: 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.

I am at a loss as to how I can trouble shoot.

I have also noticed that the STATE when i list my WSL devices is always set as "Installing" even if I completely uninstall Docker through Add/Remove programs

enter image description here



Solution 1:[1]

I have had similar error and solved as follow;

  1. In cmd, on admin mode run below command:

    docker-machine restart default

if you see anything like: it is not exist then run: docker-machine create

  1. Then you'll get a message something like:

open C:\User\{User_name}\.docker\machine\machines\default\config.json: The system cannot find the file specified.

  1. Go to the docker icon which will be on your windows tray (bottom right corner of the desktop)

  2. Right click on the docker icon > Settings > Reset > Restart Docker

This solution worked for me. And reference for this answer: docker cannot start on windows

Solution 2:[2]

Literally do as it says: launch Docker as admin.

Quit Docker, and ensure it is no longer running. You should be able to see if its running in the system tray. Right click -> Quit Docker Desktop

enter image description here

It may take a few seconds for it to stop. Wait for the windows notification: enter image description here

Navigate to the installation directory, which for me was defaulted to C:\Program Files\Docker\Docker. Launch Docker Desktop.exe as admin

enter image description here

This will open the Docker UI. Wait for Docker to fully start up before attempting to consume its services

Solution 3:[3]

I had the same problem and here's how I solved it. Install the Docker and please follow brief instructions...

First - I enabled virtualization from BIOS.

Second - I downloaded and installed Linux kernel update package.

Third - Go to "Turn windows features on and off" window Check whether following is checked...

        * Virtual Machine Platform

        * Windows Hypervisor Platform 

        * Windows Subsystem for Linux 

You need to restart the PC and Docker will be working. Please refer the following link and it will definitely give you more information - https://docs.docker.com/docker-for-windows/install/

Solution 4:[4]

Have you tried running Docker using WSL2?

https://docs.docker.com/docker-for-windows/wsl/

Solution 5:[5]

Go to Powershell (run as administrator), and run this lines

cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2
Solution 3
Solution 4 Fábio Batista
Solution 5 Maciej Bledkowski