olo
olo

Reputation: 5271

docker-machine env default | eval "$(docker-machine env default)" | unable to run command docker

I've tried on Windows 10, windows 7 and Mac OSX, everything went well, but I am unable to run docker command after run docker-machine env default and eval "$(docker-machine env default)" I don't get any error messages.

$ docker-machine version
docker-machine version 0.8.2, build e18a919

env default

$ docker-machine env default
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.78.120:2376"
export DOCKER_CERT_PATH="/Users/elo/.docker/machine/machines/default"
export DOCKER_MACHINE_NAME="default"
# Run this command to configure your shell:
# eval "$(docker-machine env default)"

connect to virtualbox machine

$ eval "$(docker-machine env default)"

then I run

$ docker

command not found: docker

I tried windows 10, windows 7 and Mac, just can't communicate with Virtualbox machine, so no docker command is found

I am able to ssh default

Is there anything I missed?

Upvotes: 0

Views: 1626

Answers (2)

Abhay Dwivedi
Abhay Dwivedi

Reputation: 2030

I think "docker-machine ssh default" will work fine here. By writing ssh you are creating a secure shell connection to your host and then you can talk to your host.

Upvotes: 0

enderland
enderland

Reputation: 14185

I tried windows 10, windows 7 and Mac, just can't communicate with Virtualbox machine, so no docker command is found

This isn't your error.

Your error is that your shell cannot find the docker executable. Docker requires two pieces, the server daemon (which is running in docker-machine's VM) and the client.

Make sure you have installed the docker client and that it is available in your $PATH.

Upvotes: 1

Related Questions