Can't connect to docker from docker-compose

前端 未结 24 2032
说谎
说谎 2020-12-07 10:14

I installed docker-machine 0.1.0 and docker-compose 1.1.0 on Mac OS 10.8.5.
Docker-machine is running normally and able to connect by docker-machine ssh.



        
24条回答
  •  离开以前
    2020-12-07 10:57

    The Docker machine is running. But you need to export some environment to connect to the Docker machine. By default, the docker CLI client is trying to communicate to the daemon using http+unix://var/run/docker.sock (as shown in the error message).

    Export the correct environment variables using eval $(docker-machine env dev) and then try again. You can also just run docker-machine env dev to see the environment variables it will export. Notice that one of them is DOCKER_HOST, just as the error message suggests you may need to set.

提交回复
热议问题