Z
Z
zlodiak2019-06-14 11:12:24
Docker
zlodiak, 2019-06-14 11:12:24

Why add a user to the docker group?

I installed docker on ubuntu and ran the following command:
sudo usermod -a -G docker user-name
The problem is that I don't quite understand what it means. Here are my thoughts on the matter:


  • 1. after installing docker, the docker user group was automatically created in the OS
  • 2. this group is currently empty
  • 3. using the -a -G switches, I add a user named user-name to this group
  • 4. now I don't have to use sudo for every command
  • 5. however, it is not clear that I did not log in with this user

Please explain what exactly I achieved with this team

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2019-06-14
@zlodiak

even easier - now you can work with docker as your user, you don't have to do it through sudo or even as root.

A
Askhat Bikmetov, 2019-06-14
@askhat

You got the rights to execute docker binaries for your user

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question