docker使用问题01_got_permission_denied_while

Posted 张欣-男

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了docker使用问题01_got_permission_denied_while相关的知识,希望对你有一定的参考价值。

1 问题

Got permission denied while trying to connect to the Docker daemon socket

2 解决方法

Create the docker group.
创建docker组。

sudo groupadd docker

添加用户到docker组里。
Add your user to the docker group.

sudo usermod -aG docker $USER

先退出再登录
You would need to loog out and log back in so that your group membership is re-evaluated or type the following command:

su -s $USER

测试
Verify that you can run docker commands without sudo.

docker run hello-world

以上是关于docker使用问题01_got_permission_denied_while的主要内容,如果未能解决你的问题,请参考以下文章