Mac在这里。我通过the Toolbox安装了Docker,并且所有Docker命令都产生了同样的错误:
myuser@mymachine:~/tmp$docker info
Get http:///var/run/docker.sock/v1.20/info: dial unix /var/run/docker.sock: no such file or directory.
* Are you trying to connect to a TLS-enabled daemon without TLS?
myuser@mymachine:~/tmp$sudo docker info
Password:
Get http:///var/run/docker.sock/v1.20/info: dial unix /var/run/docker.sock: no such file or directory.
* Are you trying to connect to a TLS-enabled daemon without TLS?
* Is your docker daemon up and running?
有趣的是,然而:
myuser@mymachine:~/tmp$docker -v
Docker version 1.8.1, build d12ea79
Google results | for this error表示工具箱未正确安装,并且需要设置以下(或所有)以下环境变量中的一个:
DOCKER_HOST
;和/或DOCKER_CERT_PATH
;和/或DOCKER_TLS_VERIFY
我已验证DOCKER_HOST
未在我的计算机上设置(env
和echo $DOCKER_HOST
都没有显示它。所以我担心:
到目前为止,运行一个答案建议的命令:
myuser@mymachine:~/tmp$docker-machine start default
Error: Host does not exist: default
myuser@mymachine:~/tmp$eval $(docker-machine env default)
Error: Host does not exist: default
想法?
答案 0 :(得分:5)
执行命令
$ docker-machine start default
$ eval $(docker-machine env default)
再试一次。
这些环境变量将本地Docker客户端指向VM中运行的Docker引擎。以上命令将适当地设置它们。