使用Docker尝试快速集群部署:无法通过unix:///var/run/docker.sock连接到Docker守护程序。泊坞窗守护程序正在运行吗?

时间:2019-05-31 08:31:06

标签: docker dolphindb

我发现DolphinDB现在支持使用Docker容器进行快速集群部署,并且我遵循了gigthub上的指南:https://github.com/dolphindb/Tutorials_CN/blob/master/docker_deployment.md来部署具有DolphinDB Docker软件包的集群。但是我遇到了一个问题。我看了其他任何问题,但找不到自己的解决方案。

问题出在这里

xllu@xllu-OptiPlex-7060:~/DolphinDB-Docker-Compose/Dockerbuild$ docker -v
Docker version 18.09.3, build 774a1f4
xllu@xllu-OptiPlex-7060:~/DolphinDB-Docker-Compose/Dockerbuild$ docker-compose --version
docker-compose version 1.24.0, build 0aa59064
xllu@xllu-OptiPlex-7060:~/DolphinDB-Docker-Compose/Dockerbuild$ docker build -t ddb:latest ./
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

我尝试重新启动docker:

xllu@xllu-OptiPlex-7060:~/DolphinDB-Docker-Compose/Dockerbuild$ sudo service docker restart
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.

然后我检查了此内容:

xllu@xllu-OptiPlex-7060:~/DolphinDB-Docker-Compose/Dockerbuild$ systemctl status docker.service
● docker.service - LSB: Create lightweight, portable, self-sufficient containers.
   Loaded: loaded (/etc/init.d/docker; generated)
   Active: failed (Result: exit-code) since Fri 2019-05-31 15:16:01 CST; 16s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 29234 ExecStart=/etc/init.d/docker start (code=exited, status=1/FAILURE)
 Main PID: 2596 (code=exited, status=0/SUCCESS)

5月 31 15:16:01 xllu-OptiPlex-7060 systemd[1]: Starting LSB: Create lightweight, portable, self-sufficient containers....
5月 31 15:16:01 xllu-OptiPlex-7060 docker[29234]:  * /usr/bin/dockerd not present or not executable
5月 31 15:16:01 xllu-OptiPlex-7060 systemd[1]: docker.service: Control process exited, code=exited status=1
5月 31 15:16:01 xllu-OptiPlex-7060 systemd[1]: docker.service: Failed with result 'exit-code'.
5月 31 15:16:01 xllu-OptiPlex-7060 systemd[1]: Failed to start LSB: Create lightweight, portable, self-sufficient containers..

1 个答案:

答案 0 :(得分:0)

您可以尝试使用/var/lib/docker删除sudo rm -rf /var/lib/docker并尝试重新启动docker吗?

您将丢失存储的图像