我得到一个错误消息,说我不能连接到docker守护进程。我看了其他人的答案,他们也有类似的问题,但没有帮助。我运行的是Ubuntu 15.10版本。我会尽力提供我所掌握的所有信息。
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.
码头工人版本
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版本
root@# docker-compose --version
docker-compose version 1.5.2, build 7240ff3
这是我试图停止或启动服务时发生的情况…
root@# sudo service docker stop
stop: Unknown instance:
root@# sudo service docker start
docker start/running, process 5375
如果我运行ps aux | grep docker
root@# ps aux | grep docker
root 4233 0.0 0.0 13692 2204 pts/15 S+ 10:27 0:00 grep --color=auto docker
任何帮助都将不胜感激。如果你还需要其他信息,请告诉我。
有没有可能你删除了默认机器?
但是,首先检查是否所有文件都在那里(OSX,在其他系统上类似)
brew install docker docker-compose docker-machine xhyve docker-machine-driver-xhyve
brew link docker docker-compose docker-machine xhyve docker-machine-driver-xhyve
sudo chown root:wheel /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
sudo chmod u+s /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
此外,安装Docker App,因为它更容易维护容器:
brew cask reinstall docker
从finder启动Docker应用程序(等待服务完全启动)
然后用以下方法检查安装情况:
docker-machine ls
如果列表中没有机器,创建一个并启动它:
docker-machine create default
docker-machine start default
在此之后,构建、组合和所有其他命令应该正常工作。
有没有可能你删除了默认机器?
但是,首先检查是否所有文件都在那里(OSX,在其他系统上类似)
brew install docker docker-compose docker-machine xhyve docker-machine-driver-xhyve
brew link docker docker-compose docker-machine xhyve docker-machine-driver-xhyve
sudo chown root:wheel /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
sudo chmod u+s /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
此外,安装Docker App,因为它更容易维护容器:
brew cask reinstall docker
从finder启动Docker应用程序(等待服务完全启动)
然后用以下方法检查安装情况:
docker-machine ls
如果列表中没有机器,创建一个并启动它:
docker-machine create default
docker-machine start default
在此之后,构建、组合和所有其他命令应该正常工作。