Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/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.39/images/create?fromImage=mysql&tag=latest: dial unix /var/run/docker.sock: connect: permission denied
报错如图
在这里插入图片描述
解决办法是直接切换到root用户得到足够权限
直接输入su然后输入密码即可

su

如果提示su: Authentication failure,直接暴力重置密码

sudo passwd root

你可能感兴趣的:(Java,docker,unix,容器)