Dockerized version of webhook (https://github.com/adnanh/webhook) based on docker-cli.
10K+
This repository contains a Dockerized version of the webhook package, built on top of the official Docker image. This setup allows direct access to the Docker host, providing a streamlined and efficient way to manage webhooks. Given that the existing instructions were outdated, this repository offers up-to-date (2024-06-19) solution.
docker run -d -p 9000:9000 --name=webhook \
-v /path/to/hooks/on/host:/etc/webhook \
-v /path/to/scripts/on/host:/opt/scripts \
-v /var/run/docker.sock:/var/run/docker.sock \
lwlook/webhook -verbose -hooks=/etc/webhook/hooks.json -hotreload
This Docker image allows you to manage and deploy webhooks. For detailed instructions on configuring and using the webhook package, refer to the original documentationâ .
FROM golang:alpine AS build
MAINTAINER Almir Dzinovic <[email protected]>
WORKDIR /go/src/github.com/adnanh/webhook
ENV WEBHOOK_VERSION 2.8.1
RUN apk add --update -t build-deps curl libc-dev gcc libgcc
RUN curl -L --silent -o webhook.tar.gz https://github.com/adnanh/webhook/archive/${WEBHOOK_VERSION}.tar.gz && \
tar -xzf webhook.tar.gz --strip 1
RUN go get -d -v
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /usr/local/bin/webhook
FROM docker:26-cli
COPY --from=build /usr/local/bin/webhook /usr/local/bin/webhook
WORKDIR /etc/webhook
VOLUME ["/etc/webhook"]
EXPOSE 9000
ENTRYPOINT ["/usr/local/bin/webhook"]
Content type
Image
Digest
sha256:93f708c6câĤ
Size
61.2 MB
Last updated
almost 2 years ago
Requires Docker Desktop 4.37.1 or later.