Docker without sudo


Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.32/containers/json: dial unix /var/run/docker.sock: connect: permission denied

Solution nr. 1 (as root)

sudo usermod -a -G docker $USER

Solution nr. 2 (as not-root)

sudo groupadd docker
sudo usermod -aG docker $USER
// Either do a newgrp docker or log out/in to activate the changes to groups