Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 78
    They need a better error =/ This question has 13,000 views Commented Apr 5, 2017 at 22:18
  • 6
    the real fix is creating the docker group, while the sudo is just a workaround/hack, in my opinion. as the group creating part is not explained here, only a link is given, and the content of that link changed, i consider this a link-only-answer, and it is now essentially useless (for the real fix part). could you maybe add the description of how to add that group? Commented Sep 5, 2017 at 7:34
  • 6
    I think sudo is a bad idea as well. See the Docker docs for managing Docker as a non-root user: docs.docker.com/engine/installation/linux/linux-postinstall/… Commented Nov 2, 2017 at 15:20
  • 11
    Basically, all you need to do is sudo usermod -aG docker $USER, and it will work afterwards. Commented Jan 11, 2018 at 15:32
  • 1
    Don't forget this:Log out and log back in so that your group membership is re-evaluated. If testing on a virtual machine, it may be necessary to restart the virtual machine for changes to take effect. On a desktop Linux environment such as X Windows, log out of your session completely and then log back in. Commented May 14, 2019 at 4:31