此问题是因为Docker安装后未启动所致,执行以下命令启动docker:

systemctl start docker.service

具体日志如下:

Docker未启动错误:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

 

Connecting to 172.16.10.217:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.

Last login: Fri Aug 24 17:35:46 2018
[root@localhost ~]# docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[root@localhost ~]# systemctl start docker.service
[root@localhost ~]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@localhost ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
[root@localhost ~]# 

 以上显示已经成功启动。

相关文章: