001、普通用户操作docker遇到如下问题
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/json": dial unix /var/run/docker.sock: connect: permission denied
002、查看文件权限
[liujiaxin01@PC1 home]$ ll /var/run/docker.sock ## root和docker用户组有权限
003、修改权限,将普通用户liujiaxin01加入到docker用户组
[liujiaxin01@PC1 home]$ echo $USER liujiaxin01 [liujiaxin01@PC1 home]$ sudo gpasswd -a $USER docker [sudo] password for liujiaxin01: Adding user liujiaxin01 to group docker
004、重启shell终端,测试docker
[liujiaxin01@PC1 ~]$ docker image ls
标签:run,permission,sock,unix,var,liujiaxin01,docker From: https://www.cnblogs.com/liujiaxin2018/p/17417121.html