ubuntu – 尝试连接到Docker守护程序套接字时权限被拒绝

前端之家收集整理的这篇文章主要介绍了ubuntu – 尝试连接到Docker守护程序套接字时权限被拒绝前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

在Ubuntu 16.04 LTS上,每当尝试使用docker login命令时,将显示以下交战消息:

docker login
Warning: Failed to get default registry endpoint from daemon (Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.30/info: dial unix /var/run/docker.sock: connect: permission denied). Using system default: https://index.docker.io/v1/
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID,head over to https://hub.docker.com to create one.
Username: csomethingr
Password: 
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.30/auth: dial unix /var/run/docker.sock: connect: permission denied

解决方案吗

最佳答案
使用sudo docker登录

或者@Serey提到将您的用户添加到docker组

usermod -aG docker $USER

从你的会话中断开!

原文链接:https://www.f2er.com/docker/435921.html

猜你在找的Docker相关文章