docker 每次都要sudo, 或者其他服务启动的时候,提示上述的错误
ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
添加docker group:
sudo groupadd docker
将当前用户加入docker group内
sudo gpasswd -a ${USER} docker
重启docker
sudo systemctl restart docker
切换当前会话到新 group 或者重启 X 会话
newgrp - docker
评论 (0)