码迷,mamicode.com
首页 > 其他好文 > 详细

Docker使用问题记录贴

时间:2019-03-02 10:57:51      阅读:203      评论:0      收藏:0      [点我收藏+]

标签:ons   http   问题   nbsp   details   user   virtual   str   and   

 请参考:

https://blog.csdn.net/u013948858/article/details/78429954

 


 

问题:安装Docker之后,执行docker run hello-world 命令,权限报错。

daemonnnn@daemonnnn-virtual-machine:~$ docker --version 
Docker version 18.09.3, build 774a1f4
daemonnnn@daemonnnn-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使用问题记录贴

标签:ons   http   问题   nbsp   details   user   virtual   str   and   

原文地址:https://www.cnblogs.com/daemonFlY/p/10459902.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!