From 2ec141da542ab7563c7104b3a950bc503e4959fb Mon Sep 17 00:00:00 2001 From: Tyler Brock Date: Fri, 16 Aug 2013 13:19:59 -0400 Subject: [PATCH] Add instructions for creating and using the docker group --- docs/sources/use/basics.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/sources/use/basics.rst b/docs/sources/use/basics.rst index 78f1bf9678..106fde22da 100644 --- a/docs/sources/use/basics.rst +++ b/docs/sources/use/basics.rst @@ -50,6 +50,21 @@ the daemon starts. The ``docker`` daemon must always run as root, but if you run the ``docker`` client as a user in the *docker* group then you don't need to add ``sudo`` to all the client commands. +.. code-block:: bash + + # Add the docker group + sudo groupadd docker + + # Add the ubuntu user to the docker group + sudo gpasswd -a ubuntu docker + + # Have the docker group own the docker.sock file + sudo chown root:docker /var/run/docker.sock + + # Restart the docker daemon + sudo service docker restart + + Bind Docker to another host/port or a Unix socket -------------------------------------------------