docker 报错 :Cannot connect to the Docker daemon at . Is the docker daemon running?
[root@lowkey ~]# docker pull b3log/solo
Using default tag: latest
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
解决方法就是,需要 reload 一下 daemon,然后 restart docker,执行下面的两个命令
systemctl daemon-reload
systemctl restart docker.service
然后 docker ps 发现可以了
[root@lowkey ~]# systemctl daemon-reload
[root@lowkey ~]# systemctl restart docker.service
[root@lowkey ~]# docker pull b3log/solo
Using default tag: latest
Trying to pull repository docker.io/b3log/solo ...
latest: Pulling from docker.io/b3log/solo
59bf1c3509f3: Pull complete
20ae5de21b22: Pull complete
3048de22201a: Pull complete
03951bdd8dc2: Pull complete
063aa39c8788: Pull complete
f746c70f3528: Pull complete
Digest: sha256:34b355456c312d2273c960b37a455067e2a06b9f50556c7a534aaee3252bbea1
Status: Downloaded newer image for docker.io/b3log/solo:latest
[root@lowkey ~]#
如果上述办法不行,可以运行 ps -elf |grep docker
如果存在进程
就运行 ps -elf |grep docker | awk '{print $4}'|xargs kill -9
然后再执行
systemctl daemon-reload
systemctl start docker.service
应该就可以了。
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于