Enabling Non-root Users to Run Docker Commands on Ubuntu


The following procedure applies to version 1.5 and later of Docker.

To enable users other than root and users with sudo access to be able to run Docker commands:

Add the user into docker Group

For current user
$ sudo usermod -aG docker $(whoami)
For any other user account:
$ sudo usermod -aG docker <username>

Now logout the user account and login back (or) exit from the terminal and login back

Note:
  1. Users who can run Docker commands have effective root control of the system. Only grant this privilege to trusted users.

Post a Comment

0 Comments