microsoft / vscode-dev-containers

NOTE: Most of the contents of this repository have been migrated to the new devcontainers GitHub org (https://github.com/devcontainers). See https://github.com/devcontainers/template-starter and https://github.com/devcontainers/feature-starter for information on creating your own!
https://aka.ms/vscode-remote
MIT License
4.7k stars 1.41k forks source link

Permission issue with hosts mounted docker unix socket #1736

Closed naturedamends closed 10 months ago

naturedamends commented 1 year ago

Sorry if this is wrong place.

adding to devcontainars.json

    "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],
docker ps
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.24/containers/json": dial unix /var/run/docker.sock: connect: permission denied