ncarlier/webhookd

is there a way to run the scripts on the docker host?

Zavy86 opened this issue · 3 comments

Hi, I have installed webhookd via docker, can I run the scripts commands on the host machine instead of inside the container?
I want to execute for example this script to refresh a stack:

#!/bin/bash
cd /var/repositories/testwebapp && git pull && docker compose down && docker compose up -d

Is there an easy way to do this?

Thank you, Manuel

Hi, you have 2 options:

  • Start webhookd directly on the Docker host. You can use this repository if your are using Debian or Ubuntu: https://packages.azlux.fr/
  • Mount Docker socket in order to do Docker in Docker. It's the purpose of ncarlier/webhookd:edge-distrib image. Docker client is part of the image:
docker run -d --name=webhookd -v ${PWD}/scripts:/scripts -v /var/run/docker.sock:/var/run/docker.sock -p 8080:8080 ncarlier/webhookd:edge-distrib

thank you so much, i will try!

Hello @ncarlier I tried but I got following message :(

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

Do you have a advice?