This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| cheatsheet:docker [2023/07/24 08:47] – created kamaradski | cheatsheet:docker [2023/07/24 09:00] (current) – [allow non-root to operate docker] kamaradski | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | yada | + | ====== docker command cheatsheet ====== |
| + | [[https:// | ||
| + | |||
| + | |||
| + | ===== allow non-root to operate docker ===== | ||
| + | |||
| + | Per default, the docker commands can only be run by root, in order to allow another user to fully operate docker you need to make the following changes. | ||
| + | |||
| + | < | ||
| + | // add your user to docker usergroup | ||
| + | $ sudo usermod -aG docker yourusername | ||
| + | |||
| + | // to make this effective login/ | ||
| + | $ su yourusername | ||
| + | |||
| + | // test-1 (should see the docker usergroup listed here): | ||
| + | $ id yourusername | ||
| + | |||
| + | // test-2: | ||
| + | $ docker info | ||
| + | </ | ||