CentOS 7 安装完 docker,所有 docker 命令都有这个提示
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
解决办法:
编辑 /etc/docker/daemon.json,如果没有该文件就新建
vim /etc/docker/daemon.json
内容为:
{
"registry-mirrors": ["https://b9pmyelo.mirror.aliyuncs.com"]
}
重启docker
systemctl restart docker.service