Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker in docker permission issue #331

Open
schorlton opened this issue Mar 5, 2019 · 1 comment
Open

Docker in docker permission issue #331

schorlton opened this issue Mar 5, 2019 · 1 comment

Comments

@schorlton
Copy link

When using the girder_worker docker image, unable to run docker from within the worker container due to permission issue. Specifically the docker group does not appear to be created and worker user added to the group.

Docker executable and socket were mounted into the girder_worker container as previously described: #89

-v  /tmp:/tmp
-v  /var/run/docker.sock:/var/run/docker.sock
-v  /usr/bin/docker:/usr/bin/docker

Error when trying to run docker from within the container:

worker@af4c874402be:/$ docker images
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.39/images/json: dial unix /var/run/docker.sock: connect: permission denied
@manthey
Copy link
Member

manthey commented Mar 5, 2019

In the girder_worker docker, if the docker group has a different group id than the docker group of the host system, then there can be issues. In another project (https://github.com/DigitalSlideArchive/HistomicsTK), when creating a girder_worker docker, we explicitly change the uid and gid inside the girder_worker docker to match that of the host system, and the chown files to ensure that they have the right ownership.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants