Use docker without root - xcLtw/about_docker GitHub Wiki
This document used to ubuntu
- Add group docker if it doesn't exist
sudo groupadd docker
- Add $User to the docker group,notice $User should match the user's your wanted.
Check current user:
sudo gpasswd -a $User docker
- Active the change to groups
- Check for that
docker run hello-world
The method before don't work for another terminal window,or after you log out. WILL Lose the group docker
sudo usermod -aG docker $USER ,use it ,log out/in ,it seem work fine until now..