Running docker as non-root user

To create the docker group and add your user:
  1. Create the docker group.
sudo groupadd docker

  1. Add your user to the docker group.
sudo usermod -aG docker $USER
  1. Log out and log back in so that your group membership is re-evaluated.
If testing on a virtual machine, it may be necessary to restart the virtual machine for changes to take effect.
On a desktop Linux environment such as X Windows, log out of your session completely and then log back in.
  1. Verify that you can run docker commands without sudo.
docker run hello-world


Comments

Popular posts from this blog

map struct :- Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure

How to reset to previous commit.