When first installing docker, you will find it requires root priority for even docker run
operation. So you should create a group for non-root users to run their code.
https://docs.docker.com/install/linux/linux-postinstall/
Step 1 Create the docker
group (all too often it has already been created since the first installation of docker)
sudo groupadd docker
Step 2 Add your user to the docker group. Suppose my user name is murphy
sudo usermod -aG docker murphy
More notes about group management in Linux:
- List all groups
cat /etc/group
- List all the members under a certain group
getent group groupname