Today, I tried to run docker installed on my Windows 7 (Docker toolbox) and it’s throwing an error :*(.

Running following Docker command:

MINGW64 ~
$ docker version
Client:
Version:      1.12.6
API version:  1.24
Go version:   go1.6.4
Git commit:   78d1802
Built:        Wed Jan 11 00:23:16 2017
OS/Arch:      windows/amd64
An error occurred trying to connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version: open //./pipe/docker_engine: The system cannot find the file specified.

 

Also, running the following command throws same error:

MINGW64 ~
$ docker info
An error occurred trying to connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version: open //./pipe/docker_engine: The system cannot find the file specified.

 

However, running following commands returns good results:

$ docker-machine start default
Starting "default"...
Machine "default" is already running.

$ docker-machine env default
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="C:\Users\userName\.docker\machine\machines\default"
export DOCKER_MACHINE_NAME="default"
# Run this command to configure your shell:
# eval $("D:\Program Files\Docker Toolbox\docker-machine.exe" env default)

 

After googling, I found this link:

https://github.com/docker/docker/issues/22338

 

So, to fix it, we need to run the following in my git-bash:

eval $("D:\Program Files\Docker Toolbox\docker-machine.exe" env default)

 

Then try again the following:

docker version

And it should it should be good now:

$ docker version
Client:
Version:      1.12.6
API version:  1.24
Go version:   go1.6.4
Git commit:   78d1802
Built:        Wed Jan 11 00:23:16 2017
OS/Arch:      windows/amd64

Server:
Version:      1.12.6
API version:  1.24
Go version:   go1.6.4
Git commit:   78d1802
Built:        Wed Jan 11 00:23:16 2017
OS/Arch:      linux/amd64

 

Life is good again 😀

happy coding.