sudo nano /etc/default/docker
-H
flag in the DOCKER_OPTS
variable in the /etc/default/docker
file.DOCKER_OPTS="-H tcp://0.0.0.0:80"
sudo usermod -aG docker $USER
usermod
: This is the command for modifying user accounts.-a
: This flag tells usermod
to add the specified group to the user's existing groups (instead of replacing them).-G docker
: This specifies the name of the group to add the user to, which is "docker" in this case.$USER
: This is a shell variable that expands to the username of the currently logged-in user. The command is replacing $USER
with the actual username of the user account you want to modify.sudo getent group
groups $USER