mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add instructions for creating and using the docker group
This commit is contained in:
parent
92a2b635a3
commit
2ec141da54
1 changed files with 15 additions and 0 deletions
|
@ -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
|
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.
|
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
|
Bind Docker to another host/port or a Unix socket
|
||||||
-------------------------------------------------
|
-------------------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue