docker运行错误 /var/run/docker.sock: no such file or directory

docker运行时提示:

Get http:///var/run/docker.sock/v1.15/images/json: dial unix /var/run/docker.sock: no such file or directory

说明docker服务没有启动,可以用run命令确认一下:

[root@localhost cos]# docker run aaa
2018/10/11 11:43:41 Cannot connect to the Docker daemon. Is 'docker -d' running on this host?

解决方法,启动服务即可:

[root@localhost cos]# service docker start
Redirecting to /bin/systemctl start  docker.service

(docker -d 也可以)

你可能感兴趣的:(docker)