-->

Friday, April 22, 2016

Granting normal users access on docker containers

Depending on your needs you might want to give normal users depending on there role to have permission so create docker containers. You don't want to go out giving sudo privileges to all users just to maintain the docker containers.

If you run the docker container you would receive an error stating permission denied as


To overcome this problem we are going to add the normal user under the docker group. This would enable them to create the docker containers. The docker group is created by default once you install the docker. You might want to restrict users who have the access on docker containers depending on you environment.



  sudo gpasswd -a vagrant docker  
  cat /etc/group | grep docker


After this you might want to logout and login back on the server because ubuntu caches the permission by default for your user session after logging back in or taking other session try logging back in the server. You should be able to execute that command now.




0 comments:

Post a Comment