Docker Community Forums

Share and learn in the Docker community.

MAC OSX fails to connect to docker


(Irazabal) #1

Installed latest boot2docker & virtualbox…I get the following:
alexs-MacBook-Pro:~ mac1$ docker run hello-world
Cannot connect to the Docker daemon. Is ‘docker -d’ running on this host?
alexs-MacBook-Pro:~ mac1$ sudo docker version
Client version: 1.7.1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 786b29d
OS/Arch (client): darwin/amd64
Get http:///var/run/docker.sock/v1.19/version: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?
alexs-MacBook-Pro:~ mac1$ docker version
Client version: 1.7.1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 786b29d
OS/Arch (client): darwin/amd64
Cannot connect to the Docker daemon. Is ‘docker -d’ running on this host?
alexs-MacBook-Pro:~ mac1$

I’ve read the forums and don’t see this issue resolved…what is happening here?

I run OSX 10.10.4.
Thanks,
Alex


(Andy Rothfusz) #2

It sounds like you need to set the environment variables for TLS so that the docker client can find the daemon running in the VM. You can use

eval "$(boot2docker shellinit)"

(Irazabal) #3

eval "$(boot2docker shellinit)"
Writing /Users/mac1/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/mac1/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/mac1/.boot2docker/certs/boot2docker-vm/key.pem
Your environment variables are already set correctly.

that wasn’t it :frowning:


(Andy Rothfusz) #4

Once you’ve run the shellinit, what is the output from docker version?