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

利用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

上一篇:Access denied for user '密码'@'192.18.0.0' (using password: YES)


下一篇:创建kvm时提示Permission denied