Created
October 8, 2022 12:43
-
-
Save readloud/8a48db7e3dcaf2d1a697f36186e4e9c3 to your computer and use it in GitHub Desktop.
Create the docker group
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create the 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. | |
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. | |
On Linux, you can also run the following command to activate the changes to groups: | |
~~~ | |
newgrp docker | |
~~~ | |
Verify that you can run docker commands without sudo. | |
~~~ | |
docker run hello-world | |
~~~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment