Sunday, 15 March 2015

Can't connect to docker from docker-compose -


I installed Docker Machine 0.1.0 and Docker-Compose 1.1.0 on Mac OS 10.8.5.
Dock-machine is running normally and is able to connect to the Docker-machine SSH.

  $ Docker-Machine LS name active driver country url self-driving dev / virtualbox TCP: // 1982.168.99.100: 2376  

However Can not connect to Docker-Compose

docker-compose up could not connect to the Docker daemon at http + unix: // var / run / docker.sock - is it running? If this is at a non-standard location, specify the URL with the DOCKER_HOST environment variable

My Dockerfile and Docker-Composse IML is here.

Dockerfile

  By percentage: centos7 DOCKER_HOST tcp: //192.168 .99.100: 2376  

docker-compose.yml

  Web: Build :.  

Why can not connect? any idea?

The Docker Machine is running but you have to export some environment to connect to the Docker machine. By default, communication on the daemon using docker CLI client http + unix: //var/run/docker.sock (as shown in error message) Trying to do . Export the correct environment variable by using

eval $ (Docker-machine env dev) and then try again. You can also export Docker-machine env dev to see the environmental variable you can export. Note that one of them is DOCKER_HOST , as you can be suggested with an error message.


No comments:

Post a Comment