Zed
Zed

Reputation: 5921

Docker command not available on Windows 7

So I am using Docker with boot2docker for quite some time on Windows, and everything works ok. Recently, it started bothering me that in order to run docker commands, I have to start Boot2Docker terminal, and type there boot2docker ssh, and from virtual machine run docker commands. What I find strange is that after starting Boot2Docker terminal(without ssh-ing into vm), this is the output:

initializing...
Virtual machine boot2docker-vm already exists

starting...
Waiting for VM and Docker daemon to start...
.o
Started.
Writing C:\Users\user\.boot2docker\certs\boot2docker-vm\ca.pem
Writing C:\Users\user\.boot2docker\certs\boot2docker-vm\cert.pem
Writing C:\Users\user\.boot2docker\certs\boot2docker-vm\key.pem

To connect the Docker client to the Docker daemon, please set:
    export DOCKER_HOST=tcp://192.168.59.103:2376
    export DOCKER_CERT_PATH='C:\Users\user\.boot2docker\certs\boot2do                      cker-vm'
    export DOCKER_TLS_VERIFY=1


IP address of docker VM:
192.168.59.103

setting environment variables ...
Writing C:\Users\user\.boot2docker\certs\boot2docker-vm\ca.pem
Writing C:\Users\user\.boot2docker\certs\boot2docker-vm\cert.pem
Writing C:\Users\user\.boot2docker\certs\boot2docker-vm\key.pem
    export DOCKER_HOST=tcp://192.168.59.103:2376
    export DOCKER_CERT_PATH='C:\\Users\\user\\.boot2docker\\certs\\bo                      ot2docker-vm'
    export DOCKER_TLS_VERIFY=1

You can now use `docker` directly, or `boot2docker ssh` to log into the VM.

After that, I can run boo2docker.exe ssh, and from vm docker command. However without ssh-ing:

$ docker.exe
bash: docker.exe: command not found

Am I missing something?

Upvotes: 4

Views: 3018

Answers (3)

Paulo Merson
Paulo Merson

Reputation: 14525

In my case, the installation had created a PATH user variable, as opposed to adding the docker.exe directory to the PATH system variable. I fixed the path manually and it worked.

Upvotes: 0

208rishabh
208rishabh

Reputation: 96

Firstly, why docker.exe? try only docker. Or rather, try docker version. If this works, you can use all the docker commands smoothly.

Secondly, Boot2Docker has been deprecated recently. Its much more simple now. : https://docs.docker.com/installation/windows/

Upvotes: 0

rabs
rabs

Reputation: 1827

Same issue here - docker toolbox install doesn't add docker to the path.

Just manually add the docker.exe to your path - mine was installed to program files docker toolbox.

C:\Program Files\Docker Toolbox\

Upvotes: 4

Related Questions