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

webhookd has no permission for accessing /var/run/docker.sock #76

Closed
bastianh opened this issue Jan 31, 2023 · 2 comments
Closed

webhookd has no permission for accessing /var/run/docker.sock #76

bastianh opened this issue Jan 31, 2023 · 2 comments

Comments

@bastianh
Copy link

Hi,

when trying to access docker from within the script it fails with:

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
error: exit status 1

Thanks for your work.

@bastianh
Copy link
Author

as a workaround you can, if using docker-compose run the webhookd in the docker group.

for example if the docker group is 124 on your host:

services:
  webhookd:
    hostname: webhookd
    user: 1000:124
    image: ncarlier/webhookd:edge-distrib

@ncarlier
Copy link
Owner

It's more of a solution than a workaround ;)
There are not many "clean" solutions to this problem. You can use the root user or privileged mode but it is not recommended for security reasons. IMO the best thing to do is your solution.

@ncarlier ncarlier closed this as completed Mar 4, 2024
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