Blogger Information
Blog 28
fans 0
comment 2
visits 52109
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.
耶和华信徒的博客
Original
1775 people have browsed it

如果docker出现错误:

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.35/images/create?fromSrc=-&message=&repo=ubuntu-16.04&tag=: dial unix /var/run/docker.sock: connect: permission denied
ubuntu18版本

#如果还没有 docker group 就添加一个:$sudo groupadd docker

#将用户加入该 group 内。然后退出并重新登录就生效啦。$sudo gpasswd -a ${USER} docker

#重启 docker 服务$systemctl restart docker

#切换当前会话到新 group 或者重启 X 会话$newgrp - docker

#注意:最后一步是必须的,否则因为 groups 命令获取到的是缓存的组信息,刚添加的组信息未能生效,

#所以 docker images 执行时同样有错。
另一种方法:

    每次启动docker或者重启docker的之后$cd /var/run$sudo chmod 666 docker.sock

    版权声明:本文为CSDN博主「wilsonyx」的原创文章,遵循 CC 4.0 BY-SA 版权协议,


原文出处链接及本声明。原文链接:https://blog.csdn.net/qq_30505673/article/details/84768750

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post