环境:ubuntu16.04

执行命令:docker run -it centos

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

docker: 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.26/containers/create: dial unix /var/run/docker.sock: connect: permission denied

原因:没有加sudo,我的用户不是root 没办法执行

解决方案:sudo docker run -it centos

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐