拉取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
这样就哦了。
Got permission denied while trying to connect to the Docker daemon socket at unix
原文:https://www.cnblogs.com/linga/p/11036367.html