admin管理员组

文章数量:1291113

I'm working for a company that would like to provide workbench instances without the "Root access" feature.

At the same time, developers need to use docker on workbench.

I tried to add the command usermod -a -G docker jupyter in a startup script. cat /etc/group reveals this line:

[...]
docker:x:997:jupyter
[...]

However, when I run docker ps from a jupyter notebook terminal, I still get this error:

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

I didn't find any previous forum post or reference in the workbench documentation to unlock docker permissions without the root access. GPT o3 doesn't give a better answer than "Check /var/run/docker.sock permissions".

本文标签: google cloud platformHow to run docker on workbench without root accessStack Overflow