Skip to content

Instantly share code, notes, and snippets.

@stfsy
Last active April 3, 2017 16:18
Show Gist options
  • Save stfsy/9a731dc48c4fb5ab69c9c620c0e52e34 to your computer and use it in GitHub Desktop.
Save stfsy/9a731dc48c4fb5ab69c9c620c0e52e34 to your computer and use it in GitHub Desktop.
How to docker without sudo

Copied from https://github.com/sindresorhus/guides/blob/master/docker-without-sudo.md for easier lookups :)

Run Docker commands without sudo

1. Add the docker group if it doesn't already exist
$ sudo groupadd docker
2. Add the connected user $USER to the docker group

Optionally change the username to match your preferred user.

$ sudo gpasswd -a $USER docker
3. Restart the docker daemon
$ sudo service docker restart

If you are on Ubuntu 14.04-15.10, use docker.io instead:

$ sudo service docker.io restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment