Post-installation steps for Linux:
#Manage Docker as a non-root user🔗
The Docker daemon binds to a Unix socket instead of a TCP port. By default that Unix socket is owned by the user root and other users can only access it using sudo. The Docker daemon always runs as the root user. $- sudo usermod -aG $USER
To create the docker group and add your user:
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.
On Linux, you can also run the following command to activate the changes to groups:
$- newgrp docker
verify that you can run $- docker run hell-word
This command downloads a test image and runs it in a container. When the container runs, it prints a message and exits.