Skip to content

Commit a210b53

Browse files
trisperaDeRuina
andauthored
Update doc for sudo docker (#2780)
Co-authored-by: Dean Ruina <81315494+DeRuina@users.noreply.github.com>
1 parent 7afaf6e commit a210b53

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

docs/cloud/rahti/usage/cli.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,27 @@ After login with `oc`, it is possible to use the command to generate a token (`o
6464
!!! info "sudo use"
6565
Some docker client setups require to run the `docker` client as root using `sudo`. In this case the `oc login` command needs to also be run using `sudo`. This is because the login information is stored in the user's home directory, only the user that runs `oc login` is logged in to Rahti.
6666

67-
As a general recommendation, it is better to use other "rootless" runtimes like podman, when possible. It is also possible to configure Docker as non-root user. In order to do so, in most Linux distributions, you just need to type this command:
67+
As a general recommendation, it is better to use other "rootless" runtimes like podman, when possible. It is also possible to configure Docker as non-root user. In order to do so, in most Linux distributions, you just need to type this command:
68+
69+
If you have installed `docker.io`:
6870

6971
```sh
7072
sudo usermod -aG docker $USER
7173
```
7274

75+
If you have installed Docker Snap (> Ubuntu 22):
76+
77+
```sh
78+
sudo addgroup --system docker
79+
sudo adduser $USER docker
80+
newgrp docker
81+
sudo snap disable docker
82+
sudo snap enable docker
83+
```
84+
7385
And then log out and log back to have the group membership re-evaluated.
7486

87+
7588
### Using a service account token
7689

7790
Rahti also offers the opportunity of using an internal service account to interact with the registry. This is recommended for automated procedures like a CI pipeline. Even though by default 3 internal service accounts are created in every Rahti namespace: builder, default and deployer, it is recommended to create a dedicated internal service account and assign to it the `system:image-pusher` role.

0 commit comments

Comments
 (0)