34

Running docker info from an elevated PowerShell prompt shows this error:

error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.27/info: 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. (Emphasis added)

How do we run the Docker daemon from the command line? If that is not possible, how do we run it without restarting Windows? If that is not possible, how do we start it at all?

Environment info

C:\> docker --version          
Docker version 17.03.1-ce, build c6d412e      

C:\> docker-compose --version  
docker-compose version 1.11.2, build f963d76f                                          

C:\> docker-machine --version  
docker-machine.exe version 0.10.0, build 76ed2a6                                       

What we have tried

Running docker daemon. It responds as follows:

Command "daemon" is deprecated, and will be removed in Docker 1.16. Please run dockerd directly. exec: "dockerd": executable file not found in %PATH%

Enabling Hyper-V and restarting the computer.

KyleMit
  • 30,350
  • 66
  • 462
  • 664
Shaun Luttin
  • 133,272
  • 81
  • 405
  • 467
  • 1
    https://stackoverflow.com/questions/40459280/docker-cannot-start-on-windows,, https://github.com/docker/toolbox/issues/636, https://github.com/moby/moby/issues/30240, https://gavinb.net/2017/03/06/docker-on-windows-mounting-volumes/ - there are quite a few causes for this error, depending on how it's all configured and what is running and what is not. – CodeCaster May 24 '17 at 23:17
  • Does this answer your question? [Docker cannot start on Windows](https://stackoverflow.com/questions/40459280/docker-cannot-start-on-windows) – ggorlen Apr 23 '23 at 21:34

5 Answers5

24

If you're using Docker for Windows, Then simply start the desktop app installed in C:\Program Files\Docker\Docker\Docker Desktop.exe

You can also stop Docker for Windows and run just the Docker daemon dockerd.exe. That'll only let you run Docker Windows Containers. dockerd.exe is in the program files directory.

Kartik Soneji
  • 1,066
  • 1
  • 13
  • 25
friism
  • 19,068
  • 5
  • 80
  • 116
  • 2
    That works. Note: after running that command, Docker takes about three minutes to start. The whale in the task bar will say, "Docker is starting..." – Shaun Luttin May 26 '17 at 21:29
  • 1
    for me, when I am starting Docker either from Docker Desktop icon or from "C:\Program Files\Docker\Docker\Docker Desktop.exe" I get error that "windows cannot find 'C:\Program Files\Docker\Docker\Docker Desktop.exe. Make sure you have typed the name correctly and try again '. I am stuck, is there anything I can doto fix this? – Bijay Singh Jun 09 '20 at 18:27
  • start "C:\Program Files\Docker\Docker\Docker Desktop.exe" in powershell works. – Damien Golding Jul 20 '21 at 08:30
4

Docker daemon on Windows Server run as windows service. This Docker service may not be running on your machine. Follow below steps

  1. Start->Run-> services.msc

  2. Search for service named "Docker"

  3. Start service.

Pankaj Kapare
  • 7,486
  • 5
  • 40
  • 56
  • 1
    We did find a service named "Docker for Windows Service". That service is currently running. The `docker info` still gives the same error. – Shaun Luttin May 25 '17 at 00:29
  • Did you set up environment using powershell (using DockerMsftProvider) or "Docker for Windows" installable? Also are you running your server using nested virtualization or physical machine? – Pankaj Kapare May 25 '17 at 00:41
  • We used "Docker for Windows." I do not know the answer to your second question. – Shaun Luttin May 25 '17 at 01:25
  • I had downloaded Docker Desktop a while ago. It was available as Docker Desktop Service. Started it, now docker commands work. – Jack BeNimble Dec 09 '22 at 18:38
2

If you have installed docker on Windows 10 Pro with Hyper-V enabled and still you are not able to run Docker on Windows 10, then as the error suggests that your docker daemon is not started. Follow following steps it helped me to start docker successfully

  1. Use command on CMD(Admin mode) docker-machine restart default then you will get msg like "open C:\User{User_name}.docker\machine\machines\default\config.json: The system cannot find the file specified."
    Go to the docker icon which will be on your windows tray(Right corner of the desktop). Then Right click on the docker icon -> setting-> Reset -> Restart Docker It will take few moments then you will see the message "Docker is running with the green indicator".
    Note- If you have already had running Docker containers running on your system then don't follow these steps. You may lose the exiting containers.enter image description here
Magnetic_dud
  • 1,506
  • 2
  • 22
  • 36
Prabhat Maurya
  • 1,058
  • 16
  • 21
0

I had the same issue in windows 7. I found my issue was getting the VM working in virtual box.

Copy the "Boot2Docker.iso" file from "C:\Program Files\Docker Toolbox" 
into "C:\Users\<user name>\.docker\machine\cache"

Then I could run the start.sh in cygwin or Gitbash.

Note: I had to restart any cmd's for the docker to see the VM.

stevied
  • 11
  • 2
-1

I faced the same problem you just need to run as adminstration following file

dockerd.exe

you can find this file in docker installation directory. Then you can use docker command in another CLI which should also be in administration mode.

docker run hello-world