How to add to docker group

In this article let’s discuss about How to add to docker group. Let’s go through the following methods without any delay.

Method 1:

# Creates docker group
sudo groupadd docker

# Add your user to the docker group
sudo usermod -aG docker $USER

# Log out and log back in so that your group membership is re-evaluated
# GNOME example

If you are facing any issues with the above approach then try the alternative that is given below. It may look similar by have a try!

Method 2 :

sudo usermod -aG docker $USER   #$USER is your username

Hope the above solution works.

Realted Posts : Npm forever