Docker使用问题记录贴
Posted daemonfly
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Docker使用问题记录贴相关的知识,希望对你有一定的参考价值。
请参考:
https://blog.csdn.net/u013948858/article/details/78429954
问题:安装Docker之后,执行docker run hello-world 命令,权限报错。
[email protected]:~$ docker --version Docker version 18.09.3, build 774a1f4 [email protected]-virtual-machine:~$ docker run hello-world 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/containers/create: dial unix /var/run/docker.sock: connect: permission denied. See ‘docker run --help‘.
原因:
安装完Docker后,有个提示:
当要以非root用户可以直接运行docker时,需要执行 sudo usermod -aG docker runoob 命令,然后重新登陆,否则会有报错。
If you would like to use Docker as a non-root user, you should now consider adding your user to the "docker" group with something like: sudo usermod -aG docker runoob Remember that you will have to log out and back in for this to take effect!
以上是关于Docker使用问题记录贴的主要内容,如果未能解决你的问题,请参考以下文章
Docker删除报错:Error response from daemon: conflict: unable to delete 08b152afcfae (must be forced)(代码片段