Search code examples
windowsdockerdocker-machine

docker installation on Windows


I have installed Docker in my windows 10 machine.

When i open power-shell and check docker version it shows below

PS C:\Users\XXXXX> docker --version
Docker version 19.03.4, build 9013bf5

But when i ran Docker images or docker run it did not worked

PS C:\Users\XXXXX> docker images
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.

For Docker run

PS C:\Users\XXXX> docker run hello-world
docker : C:\Program Files\Docker\Docker\Resources\bin\docker.exe: error during connect: Post 
http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/containers/create: 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 not getting if docker is installed then why docker images and docker run are not working ?


Solution

  • Make sure the Docker service is runnig.

    (1) Go to Services.

    (2) Check service Docker for Windows is running.

    You can stop/start the service as well using below commands in command prompt.

    Net stop com.docker.service
    
    Net start com.docker.service
    

    Refer article : https://success.docker.com/article/docker-for-windows-fails-with-a-daemon-not-running-message