Docker Community Forums

Share and learn in the Docker community.

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


(Ralph Kincade) #1

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

(Ralph Kincade) #2

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

(Orrant42) #3

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


(Rishits85) #4

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