Docker-Compose 无法连接到 Docker 守护进程 [英] Docker-Compose can't connect to Docker Daemon

查看:149
本文介绍了Docker-Compose 无法连接到 Docker 守护进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到一条错误消息,说我无法连接到 docker 守护程序.我查看了其他有类似问题的人的答案,但没有帮助.我正在运行 Ubuntu 15.10 版本.我会尽力提供我所拥有的所有信息.

I am getting an error message saying I can't connect to the docker daemon. I have looked into other people's answers who have had similar issues but it hasn't helped. I am running the version of Ubuntu 15.10. I will try to provide all the info I have.

root@# docker-compose -f docker-compose-deps.yml up -d
ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

Docker 版本

root@# sudo docker     version
Client:
Version:      1.9.1
API version:  1.21
Go version:   go1.4.2
Git commit:   a34a1d5
Built:        Fri Nov 20 13:20:08 UTC 2015
OS/Arch:      linux/amd64
Cannot connect to the Docker daemon. Is the docker daemon running on this host?

Docker-Compose 版本

Docker-Compose Version

root@# docker-compose --version
docker-compose version 1.5.2, build 7240ff3

如果我尝试停止或启动服务会发生这种情况...

This is what happens if I try to stop or start the service...

root@# sudo service docker stop
stop: Unknown instance: 
root@# sudo service   docker start
docker start/running, process 5375

如果我运行 ps aux |grep 码头工人

root@# ps aux | grep docker
root      4233  0.0  0.0  13692  2204 pts/15   S+   10:27   0:00 grep --color=auto docker

任何帮助将不胜感激.如果您需要更多信息,请告诉我.

Any help would be greatly appreciated. Let me know if you may need anymore information.

推荐答案

我发现了这个,它似乎解决了我的问题.

I found this and it seemed to fix my issue.

GitHub 修复 Docker 守护程序崩溃

如链接所示,我更改了 docker-compose-deps.yml 文件的内容.然后我运行 docker-compose -f docker-compose-deps.yml up -d.然后我把它改回来,它出于某种原因起作用了.我不必继续我提供的链接中的步骤,但前两个步骤为我解决了问题.

I changed the content of my docker-compose-deps.yml file as seen in the link. Then I ran docker-compose -f docker-compose-deps.yml up -d. Then I changed it back and it worked for some reason. I didn't have to continue the steps in the link I provided, but the first two steps fixed the issue for me.

这篇关于Docker-Compose 无法连接到 Docker 守护进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆