I am pretty naive in this, and therefore, please forgive me for asking these questions:
- I am required to add a couple of non-root users (without the sudo access) to the docker group so they can set up their own environments. I, accordingly, followed the instructions on https://docs.docker.com/engine/install/linux-postinstall/ to get this done. The docker group was already there, and therefore, I was able to add the users via sudo usermod -aG docker $USER.
- I did $sudo newgrp docker too to activate the changes. This takes me to the root terminal and I can test the docker as docker run hello-world. But when I try to check it outside this terminal with docker run hello-world, it returns an error as: "Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock:......connect: permission denied".
- My question is how can I ensure that the users I had added to the Docker Group would be able to access the docker as a non-root users (without the sudo access)?