mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Creates docker group for non-root access
Signed-off-by: trishnaguha <trishnaguha17@gmail.com>
This commit is contained in:
parent
9e2c4de0de
commit
cdd8d3999f
6 changed files with 36 additions and 15 deletions
|
@ -141,15 +141,19 @@ To create the `docker` group and add your user:
|
||||||
|
|
||||||
1. Log into Centos as a user with `sudo` privileges.
|
1. Log into Centos as a user with `sudo` privileges.
|
||||||
|
|
||||||
2. Create the `docker` group and add your user.
|
2. Create the `docker` group.
|
||||||
|
|
||||||
|
`sudo groupadd docker`
|
||||||
|
|
||||||
|
3. Add your user to `docker` group.
|
||||||
|
|
||||||
`sudo usermod -aG docker your_username`
|
`sudo usermod -aG docker your_username`
|
||||||
|
|
||||||
3. Log out and log back in.
|
4. Log out and log back in.
|
||||||
|
|
||||||
This ensures your user is running with the correct permissions.
|
This ensures your user is running with the correct permissions.
|
||||||
|
|
||||||
4. Verify your work by running `docker` without `sudo`.
|
5. Verify your work by running `docker` without `sudo`.
|
||||||
|
|
||||||
$ docker run hello-world
|
$ docker run hello-world
|
||||||
|
|
||||||
|
|
|
@ -135,15 +135,19 @@ To create the `docker` group and add your user:
|
||||||
|
|
||||||
1. Log into your system as a user with `sudo` privileges.
|
1. Log into your system as a user with `sudo` privileges.
|
||||||
|
|
||||||
2. Create the `docker` group and add your user.
|
2. Create the `docker` group.
|
||||||
|
|
||||||
|
`sudo groupadd docker`
|
||||||
|
|
||||||
|
3. Add your user to `docker` group.
|
||||||
|
|
||||||
`sudo usermod -aG docker your_username`
|
`sudo usermod -aG docker your_username`
|
||||||
|
|
||||||
3. Log out and log back in.
|
4. Log out and log back in.
|
||||||
|
|
||||||
This ensures your user is running with the correct permissions.
|
This ensures your user is running with the correct permissions.
|
||||||
|
|
||||||
4. Verify your work by running `docker` without `sudo`.
|
5. Verify your work by running `docker` without `sudo`.
|
||||||
|
|
||||||
$ docker run hello-world
|
$ docker run hello-world
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,7 @@ To use Docker, the `docker` daemon must be running as **root**.
|
||||||
To use Docker as a **non-root** user, add yourself to the **docker**
|
To use Docker as a **non-root** user, add yourself to the **docker**
|
||||||
group by running the following command:
|
group by running the following command:
|
||||||
|
|
||||||
|
$ sudo groupadd docker
|
||||||
$ sudo usermod -a -G docker user
|
$ sudo usermod -a -G docker user
|
||||||
|
|
||||||
### OpenRC
|
### OpenRC
|
||||||
|
|
|
@ -113,15 +113,19 @@ To create the `docker` group and add your user:
|
||||||
|
|
||||||
1. Log into Oracle Linux as a user with `sudo` privileges.
|
1. Log into Oracle Linux as a user with `sudo` privileges.
|
||||||
|
|
||||||
2. Create the `docker` group and add your user.
|
2. Create the `docker` group.
|
||||||
|
|
||||||
|
sudo groupadd docker
|
||||||
|
|
||||||
|
3. Add your user to `docker` group.
|
||||||
|
|
||||||
sudo usermod -aG docker username
|
sudo usermod -aG docker username
|
||||||
|
|
||||||
3. Log out and log back in.
|
4. Log out and log back in.
|
||||||
|
|
||||||
This ensures your user is running with the correct permissions.
|
This ensures your user is running with the correct permissions.
|
||||||
|
|
||||||
4. Verify your work by running `docker` without `sudo`.
|
5. Verify your work by running `docker` without `sudo`.
|
||||||
|
|
||||||
$ docker run hello-world
|
$ docker run hello-world
|
||||||
|
|
||||||
|
|
|
@ -133,15 +133,19 @@ To create the `docker` group and add your user:
|
||||||
|
|
||||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||||
|
|
||||||
2. Create the `docker` group and add your user.
|
2. Create the `docker` group.
|
||||||
|
|
||||||
|
`sudo groupadd docker`
|
||||||
|
|
||||||
|
3. Add your user to `docker` group.
|
||||||
|
|
||||||
`sudo usermod -aG docker your_username`
|
`sudo usermod -aG docker your_username`
|
||||||
|
|
||||||
3. Log out and log back in.
|
4. Log out and log back in.
|
||||||
|
|
||||||
This ensures your user is running with the correct permissions.
|
This ensures your user is running with the correct permissions.
|
||||||
|
|
||||||
4. Verify your work by running `docker` without `sudo`.
|
5. Verify your work by running `docker` without `sudo`.
|
||||||
|
|
||||||
$ docker run hello-world
|
$ docker run hello-world
|
||||||
|
|
||||||
|
|
|
@ -239,15 +239,19 @@ To create the `docker` group and add your user:
|
||||||
|
|
||||||
This procedure assumes you log in as the `ubuntu` user.
|
This procedure assumes you log in as the `ubuntu` user.
|
||||||
|
|
||||||
3. Create the `docker` group and add your user.
|
2. Create the `docker` group.
|
||||||
|
|
||||||
|
$ sudo groupadd docker
|
||||||
|
|
||||||
|
3. Add your user to `docker` group.
|
||||||
|
|
||||||
$ sudo usermod -aG docker ubuntu
|
$ sudo usermod -aG docker ubuntu
|
||||||
|
|
||||||
3. Log out and log back in.
|
4. Log out and log back in.
|
||||||
|
|
||||||
This ensures your user is running with the correct permissions.
|
This ensures your user is running with the correct permissions.
|
||||||
|
|
||||||
4. Verify your work by running `docker` without `sudo`.
|
5. Verify your work by running `docker` without `sudo`.
|
||||||
|
|
||||||
$ docker run hello-world
|
$ docker run hello-world
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue