Sunday, September 29, 2019

Add non-root user to the docker Unix group.

It is best practice to use non-root users when working with Docker. To do this, you need to add your non-root users to the local docker Unix group. The following command shows you how to add the non-root user to the docker group and verify that the operation succeeded. You will need to use a valid user account on your own system.
$ sudo usermod -aG docker <non-root user>
$ cat /etc/group | grep docker
docker:x:999:
<non-root user>
If you are already logged in as the user that you just added to the docker group, you will need to log out and log back in for the group membership to take effect.

No comments:

Post a Comment