码迷,mamicode.com
首页 > 其他好文 > 详细

docker Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post

时间:2019-11-21 13:46:57      阅读:98      评论:0      收藏:0      [点我收藏+]

标签:rip   turn   chmod   got   maven   run   rmi   images   解决方案   

利用docker构建时,报错

+ docker pull maven:3-alpine
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.40/images/create?fromImage=maven&tag=3-alpine: dial unix /var/run/docker.sock: connect: permission denied
script returned exit code 1
 

解决方案

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

docker Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post

标签:rip   turn   chmod   got   maven   run   rmi   images   解决方案   

原文地址:https://www.cnblogs.com/codeBang/p/11904886.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!