If you have installed Docker Desktop on Windows you may come across the 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.

If you try to start or restart the service, you may see an error window appear, similar to this:

You may wish to Reset to factory defaults but this will likely not resolve the problem for you.

What you may find the fix to be is to switch the daemon between Linux and Windows Containers.

Firstly, change the working directory to: c:\Program Files\Docker\Docker.

Next, in order to switch the daemon, run .\DockerCli.exe -SwitchDaemon. Note that you will likely need to run this command twice in order to switch back to the installed(preferred) daemon:

As soon as the command successfully runs, a notification will appear to confirm that Docker Desktop is up and running.

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