Skip to content

Instantly share code, notes, and snippets.

@kylehounslow
Last active June 19, 2019 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylehounslow/e265db52cad10a8ae7191b5f3f389b9a to your computer and use it in GitHub Desktop.
Save kylehounslow/e265db52cad10a8ae7191b5f3f389b9a to your computer and use it in GitHub Desktop.
Run docker with sudo in Ubuntu
# Create new group if it does not exist
sudo groupadd docker
# Add current user to the group
sudo gpasswd -a $USER docker
# Reload shell in order to have new group settings applied
newgrp docker
# Test everything worked
docker run hello-world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment