-1

I have installed docker version 20.10.7 on my Windows 10 machine. But when I run docker ps command I am getting the following error:

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

What can be the reason for this?

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Heer
  • 15
  • 6
  • is your docker daemon running? Like mentioned in the comment below. – Rafael Rocha Sep 12 '21 at 10:02
  • @RafaelRocha I have opened the docker desktop app. Is it necessary to sign in to get docker daemon working?! – Heer Sep 12 '21 at 10:06
  • @RafaelRocha Signing in is not required unless you want to save images to dockerhub. Is the whale icon in the task bar with containers on it or is it empty? If empty start the docker desktop application – Noam Yizraeli Sep 12 '21 at 12:23
  • 1
    As of Aug 31, Docker Desktop has a paid model for enterprise, therefore may require login https://docs.docker.com/desktop/windows/release-notes/ – OneCricketeer Sep 12 '21 at 14:09
  • **Docker Installation** just restart your windows machine and wait for docker to bootup it hasn't started running.. i am assuming you followed the docker setup process correctly. – EOD-STOCK-API Sep 12 '21 at 10:34

1 Answers1

0

It might be possible that docker desktop is not running in the background.

Start > Docker Desktop (open).

Edit: The following environment properties need to be set:

 set DOCKER_CERT_PATH=%USERPROFILE%\.docker\machine\machines\default
 set DOCKER_HOST=tcp://192.168.99.100:2376
 set DOCKER_MACHINE_NAME=default
 set DOCKER_TLS_VERIFY=1
  • I have opened the docker desktop app. Is it necessary to sign in to get docker daemon working?! – Heer Sep 12 '21 at 10:06
  • Most probably the error is because of the docker desktop not running in background. Could you please check by running 'docker' command instead? – Ashish Papanai Sep 12 '21 at 10:11
  • 'docker' command is running. But when i run 'docker ps' command it is showing error – Heer Sep 12 '21 at 10:15
  • I've edited my answer to include the steps to add docker path to environment variables, Try to follow them and tell if it helps. – Ashish Papanai Sep 12 '21 at 10:18
  • Anyways, This question is already answered here. Please have a look "Docker commands fails (in Windows) - Stack Overflow" https://stackoverflow.com/questions/37527888/docker-commands-fails-in-windows – Ashish Papanai Sep 12 '21 at 10:20
  • Do I need to run these commands in cmd prompt? – Heer Sep 12 '21 at 10:21
  • Yes, You'll have to run it in command prompt. – Ashish Papanai Sep 12 '21 at 10:24
  • I ran the commands specified and after running- >set DOCKER_CERT_PATH=C:\Users\shweta\.docker\machine\machines\default. But i am getting error- unable to resolve docker endpoint: open C:\Users\shweta\.docker\machine\machines\default\ca.pem: The system cannot find the path specified. – Heer Sep 12 '21 at 10:27
  • Specify the path to the directory comprising the files `cert.pem, key.pem, ca-key.pem` These files should be in your docker installation directory. – Ashish Papanai Sep 12 '21 at 10:31
  • Docker Desktop is not the same as Docker Machine and those variables aren't used by HyperV – OneCricketeer Sep 12 '21 at 14:02