报错现象
[root@node02 ~]# docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
解决思路
- Check the service status and find that the service is running normally
- The cause of the problem: It
may be that the docker did not exit normally last time, so the docker did not start normally, and the docker process could not be found under the corresponding /var/run/ path.
解决方法
- Execute the following commands in the terminal
[root@node02 ~]# systemctl stop docker.socket
[root@node02 ~]# sudo systemctl restart docker
[root@node02 ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
Successfully resolved