Couldn’t connect to Docker daemon at http+docker://localunixsocket - is it running?
- 解決方式:正確的是將當前用戶加入docker組
- 解決步驟
sudo groupadd docker #添加docker用戶組
sudo gpasswd -a $USER docker #將登陸用戶加入到docker用戶組中
newgrp docker #更新用戶組
docker ps #測試docker命令是否可以使用sudo正常使用
sudo service docker start
sudo systemctl enable docker #開機啟動
Cannot connect to the Docker daemon at unix:///var/run/docker.sock
- 設置
daemon.json
,沒有的話創(chuàng)建,位置/etc/docker\daemon.json
,設置為國內源
# 中科大鏡像
{
"registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"]
}
- 重新加載
cd /var/lib
rm docker
dockerd --config-file /etc/docker/daemon.json
systemctl daemon-reload
文章來源地址http://www.zghlxwxcb.cn/news/detail-703150.html
文章來源:http://www.zghlxwxcb.cn/news/detail-703150.html
到了這里,關于docker啟動報錯:Cannot connect to the Docker daemon的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網!