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

解决办法:

在命令前加sudo或者切换到root用户。

猜你喜欢

转载自blog.csdn.net/zzc15806/article/details/80766521
今日推荐