webhookd
webhookd copied to clipboard
webhookd has no permission for accessing /var/run/docker.sock
trafficstars
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.
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
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.