Skip to content

Instantly share code, notes, and snippets.

@rangelvarnier
Created February 14, 2018 00:11
Show Gist options
  • Save rangelvarnier/e6a456ce205b34ca717709eca49e93d1 to your computer and use it in GitHub Desktop.
Save rangelvarnier/e6a456ce205b34ca717709eca49e93d1 to your computer and use it in GitHub Desktop.
Running docker as non root user
If you are a single user and don't want to enter your password everytime while executing docker command, you have to add the current user in docker group.
#this is most likely already created while installing docker
$ sudo groupadd docker
$ sudo gpasswd -a $USER docker
# you might need to logout if the changes are not working
$ newgrp docker
# check if docker is working without sudo
$ docker run hello-world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment