问题:
启动Docker:service docker start
运行:docker run hello-world
报错:
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker
- 方法1
管理员运行
sudo docker run hello-world
- 方法2
把普通用户加入到docker组中
sudo docker ps sudo docker images # 查看当前用户 echo $USER groupadd docker sudo gpasswd -a $USER docker ll # 更新docker组 newgrp docke ll # 不再提示权限不足 docker run hello-world docker ps docker images