Search code examples
windowsdocker

How to start the docker daemon?


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.


Solution

  • 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.