36
11
I have installed docker as described here. I use Ubuntu Trusty 14.04 (LTS) (64-bit). Everything during installation was well. Also command $ sudo docker run -i -t ubuntu /bin/bash
completes well (after I typed "exit" in opened console. But when I tryin to do something else I get "permission denied". For example:
`$ sudo docker run -d -P training/webapp python app.py`
Reuslts in Post http:///var/run/docker.sock/v1.12/containers/create: dial unix /var/run/docker.sock: permission denied
` docker info`
Reuslts in Get http:///var/run/docker.sock/v1.12/info: dial unix /var/run/docker.sock: permission denied
How to solve this? I googled about the problem but I can not find a solution for my case.
15I had to reboot to get this to take effect. – obsoleter – 2015-03-10T14:42:32.517
8Don't have to reboot, just logout and login. – Ajay Gautam – 2015-12-15T19:24:48.950
2Logout did it, even when
exec $SHELL
did not. I'm interested to know by which mechanism logging out resolved the issue. This isn't windows! – Darth Egregious – 2016-02-06T02:43:11.4131In Fedora, first you must edit
/etc/selinux/config
and putSELINUX=disabled
, then reboot Linux – Junior M – 2017-05-10T20:16:16.737You can also run
newgrp docker $USER
to enter the newly added group without having to restart a new session, though this is usually a more temporary solution if you have lots of things going on. – code_dredd – 2018-05-29T16:48:42.1801Great explanation! You're the best! :) – Francis Rodrigues – 2019-04-14T03:31:26.360