Score:1

Issues with Docker Access

ke flag

I am pretty naive in this, and therefore, please forgive me for asking these questions:

  1. 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.
  2. 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".
  3. 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)?
Score:1
pl flag

You would be safe by Running the Docker daemon as a non-root user (Rootless mode). Simply follow instructions here.

As for your specific question "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)?", simply run

 $ docker run hello-world

from the user you want to check.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.