I am trying to expose dockers tcp ip to my host docker client. I have the following setup
- Virtualbox 4.3.26 r98988
- vagrant 1.7.2
- Mac OSX Mavericks 10.9.5
- Centos 6.6 vagrant box running (docker 1.5.0)
- Docker 1.5 on the host and vagrant box
FYI, I can get to the exposed docker containers just fine in the browser. I have exposed the necessary ports in the VagrantFile
in /etc/init.d/docker I have set other_args as the following:
other_args="--insecure-registry 192.168.254.96:5000 -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock"
I have set the following DOCKER_HOST=tcp://127.0.0.1:2375
on the host and I get the following error:
FATA[0076] An error occurred trying to connect: Get https://127.0.0.1:2375/v1.17/containers/json: EOF
If i set the DOCKER_HOST=tcp://172.17.8.101 then i get
FATA[0076] An error occurred trying to connect: Get https://127.0.0.1:2375/v1.17/containers/json: EOF
I'm not able to run the usual docker ps from the host.
I tried running netstat -tulpn to see what the virtualbox/vagrant instance was listening to. It seems like 2375 is listening.
I tried looking at the virtual network settings for that instance
I have a few questions
- Did I set the tcp connection correctly in /etc/init.d/docker. Should it be the ip that I set in vagrant?
- Is there a way to check if the docker client is connecting with the mac host?