Docker on windows fails with //./pipe/docker_engine: The system cannot find the file specified

this WAS a swarm member but now I do a "docker ps " on it and this is the error

ocker : error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.25/containers/json: open
//./pipe/docker_engine: The system cannot find the file specified.
At line:1 char:1

  • docker ps
  •   + CategoryInfo          : NotSpecified: (error during co...file specified.:String) [], RemoteException
      + FullyQualifiedErrorId : NativeCommandError

I have removed the modules and packages with “Uninstall_Module dockermsftprovider” and “Uninstall_Package docker -ProviderName dockermsftprovider”

rebooted
and then reinstalled docker

rebooted and this is what I get still
S C:\Users\Administrator> docker ps
docker : error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.26/containers/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.
At line:1 char:1

  • docker ps
  •   + CategoryInfo          : NotSpecified: (error during co...is not running.:String) [], RemoteException
      + FullyQualifiedErrorId : NativeCommandError

Was there ever any fix to this. I am having the same problem

Please follow the steps below
open cmd and type the following

  1. docker-machine create box (It may ask for permissions. Allow all)

  2. docker-machine env box. After this, you should see the below output
    SET DOCKER_TLS_VERIFY=1
    SET DOCKER_HOST=tcp://192.168.99.100:2376
    SET DOCKER_CERT_PATH=C:\Users\rishi.docker\machine\machines\box
    SET DOCKER_MACHINE_NAME=box
    SET COMPOSE_CONVERT_WINDOWS_PATHS=true
    REM Run this command to configure your shell:
    REM @FOR /f “tokens=*” %i IN (‘docker-machine env box’) DO @%i

  3. Run the command “@FOR /f “tokens=*” %i IN (‘docker-machine env box’) DO @%i” As suggested in the output

This should make it work. The reason for this is that docker-enging runs as a VM on windows. As a result, the first line creates the docker engine VM

The lines
docker-machine env box
@FOR /f “tokens=*” %i IN (‘docker-machine env box’) DO @%ix
help to connect the current instance of cmd to the VM created in the first line. These will have to be run every time you open a new instance of CMD

Also check the suggestions in the link below for additional information

1 Like

I have the same problem in windows 10. Then I checked virtual Machine in Hyper-V Manager tool and found that it didn’t start.

I fixed the issue by switch docker to windows containers, then switch docker to linux container again. I used docker desktop tool.

We can switch docker container by command line

  • go to path of docker
  • run command: ./DockerCli.exe -SwitchDaemon

Hope it helpful!

2 Likes

I solved this problem.

2 Likes

No, you didn’t. I have this problem now

PS C:\Users\XXXX> docker --version
Docker version 24.0.4, build 3713ee1
PS C:\Users\XXXX> docker images
error during connect: this error may indicate that the docker daemon is not running: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/images/json": open //./pipe/docker_engine: The system cannot find the file specified.
1 Like