0
votes

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.40/containers/json: dial unix /var/run/docker.sock: connect: permission denied

I write theses commands to give me Sudo permission while I am working with docker in terminal '''

 sudo groupadd docker

 sudo usermod -aG docker ${USER}

 newgrp docker

'''

but after closing the terminal it does not save the configuration for next terminals that I am opening

1

1 Answers

0
votes

Please restart the Docker service to take effect. If No luck. then restart should do the trick