2.0 Adding Users to Docker Group
*Must be done on each docker node if there's more than one
*PAT= placeholder name *Any confusion on command syntax/structure can be clarified in in Legend
-
Login to the docker node and escalate to superuser
sudo su -
-
Add the user
sudo adduser pat[USER] (set the password to something easy i.e. password // can also be changed in /etc/passwd)
-
Give user permission to the docker and sudoers group
sudo usermod -aG docker pat[USER]
sudo usermod -aG sudo pat[USER]
-
Connect to user’s account and import user’s Github keys
su pat[USER]
ssh-import-id-gh [PAT's GITHUB USERNAME]
-
Test whether or not the user can connect to each docker swarm:
ssh pat@[[USER]@[IP Address]ADDRESS]
-
Have user change their password NOT ON ROOT:
passwd (change on each docker node)
Last Updated: 2/19/22/2025
Contributors: Lilian, Vivian