Oct 17, 2019

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 and chance sock permission
Optionally change the username to match your preferred user.
$ sudo gpasswd -aG $USER docker

$ sudo chmod 666 /var/run/docker.sock 

3. Restart the docker daemon

$ sudo service docker restart

Source: https://github.com/sindresorhus/guides/blob/master/docker-without-sudo.md

No comments:

Post a Comment