error during connect: This error may indicate that the docker daemon is not running

Viewed 17897

I am new to Docker and after writing docker version in cmd I got this error,

error during connect: This error may indicate that the docker daemon is not running.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version": open //./pipe/docker_engine: The system cannot find the file specified.

9 Answers

The below steps solved this problem

  1. Open cmd as administrator
  2. Launch command: C:\Program Files\Docker\Docker\DockerCli.exe -SwitchDaemon

some times docker might be disabled from starting on boot or login so in the windows search bar or when clicking the WinKey and starting to type Dock... like showen in the picture below, Then press Enter to start the Docker Daemon press Enter to start Docker Daemon

Try running dockerd in a separate terminal and then try running this command.

To avoid doing this every time you can go to services -> find Docker -> select Startup Type as Automatic (Delayed) and reboot the machine.

On Windows, reason behind this issue is that Docker is not started. I tried couple of solution provided on multiple online portal to start it. What worked for me is:

  1. In Docker Desktop if you are already logged in as a user, logout from there

  2. Again login to docker desktop with docker account

When we login to docker account, it internally triggers the restart. So resulting if it's not started, it will start the docker for us.

I had this, but when I used a command shell elevated to Administrator, docker version was fine.

Simple Solution: Just open Powershell and type dockerd which will start the daemon and you shall be able to use the docker now without errors.

In my case, I download the this github repo.MaxySpark

Closed all the application related to docker.
1.Click on docker.reg file in the downloaded repo.
2.Click on yes->yes->ok to merge.
3.Again open the Docker Toolbox and run docker run hello-world

enter image description here

  1. Open cmd as administrator
  2. Launch command: C:\Program Files\Docker\Docker\DockerCli.exe -SwitchDaemon
Related