Got permission denied while trying to connect to the Docker daemon socket at unix


拉取Dockerimages時錯誤信息如下:

[master@localhost ~]$ docker pull redis
Using default tag: latest
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.39/images/create?fromImage=redis&tag=latest: dial unix /var/run/docker.sock: connect: permission denied

看樣子是權限出問題了,查看當前用戶的屬組是否具有docker

[master@localhost ~]$ groups 
master wheel

將當前用戶添加到docker屬組中:

usermod -a -G docker 當前用戶名

然后退出重新登陸,查看組:

[master@localhost ~]$ groups 
master wheel docker

這樣就哦了。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM