Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker sudo permissions

I am able to run docker without sudo but after sometimes it again asks for permissions and I am not able to Attach container in VS code

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
like image 204
buvanesh buvhi Avatar asked Mar 04 '26 17:03

buvanesh buvhi


1 Answers

To sort out permission errors and to run containers, check the following command

sudo chmod 666 /var/run/docker.sock
like image 157
Ravi kumar Avatar answered Mar 06 '26 12:03

Ravi kumar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!