Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Permission issue using remote development extension to attach to a docker image

Tags:

docker

I have added current user to docker group and I'm able to run docker commands like docker run hello-world in terminal opened in vscode with no problem, but vscode doesn't let me attach to a running container, giving "current user does not have permission to run docker. Try adding the user to the 'docker' group" error message. My system is Ubuntu 18.04, VS code is 1.39.0-insider

like image 285
nalzok Avatar asked Nov 24 '25 05:11

nalzok


1 Answers

If you've not already created a docker group

sudo groupadd docker

Then

sudo usermod -aG docker $USER

Then log out and back in (or reboot) again.

like image 144
Michael Millar Avatar answered Nov 26 '25 19:11

Michael Millar



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!