mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-12-25 06:49:31 +01:00
update webhook
This commit is contained in:
@@ -2,23 +2,25 @@
|
||||
# Dockerfile for webhook
|
||||
#
|
||||
|
||||
FROM golang:alpine AS build
|
||||
ENV CGO_ENABLED=0
|
||||
ENV GOOS=linux
|
||||
ENV GOARCH=amd64
|
||||
ENV GO111MODULE=off
|
||||
WORKDIR /go/bin
|
||||
RUN apk add --no-cache git
|
||||
RUN go get -d -v github.com/adnanh/webhook
|
||||
RUN go build --ldflags '-s -extldflags "-static"' -i -o webhook github.com/adnanh/webhook
|
||||
|
||||
FROM alpine:3
|
||||
MAINTAINER EasyPi Software Foundation
|
||||
RUN apk add --no-cache bash coreutils curl jq
|
||||
COPY --from=build /go/bin/webhook /usr/local/bin/
|
||||
|
||||
ARG WEBHOOK_VERSION=2.8.1
|
||||
ARG WEBHOOK_OS=linux
|
||||
ARG WEBHOOK_ARCH=amd64
|
||||
ARG WEBHOOK_FILE=webhook-$WEBHOOK_OS-$WEBHOOK_ARCH.tar.gz
|
||||
ARG WEBHOOK_URL=https://github.com/adnanh/webhook/releases/download/$WEBHOOK_VERSION/$WEBHOOK_FILE
|
||||
|
||||
RUN set -xe \
|
||||
&& apk add --no-cache bash coreutils curl gcompat jq \
|
||||
&& curl -sSL $WEBHOOK_URL | tar xz -C /usr/local/bin ${WEBHOOK_FILE%.tar.gz}/webhook --strip 1 \
|
||||
&& webhook --version
|
||||
|
||||
WORKDIR /etc/webhook
|
||||
VOLUME /etc/webhook
|
||||
|
||||
EXPOSE 9000
|
||||
|
||||
ENTRYPOINT ["webhook"]
|
||||
# Doc: https://github.com/adnanh/webhook/blob/master/docs/Webhook-Parameters.md
|
||||
# See: https://github.com/adnanh/webhook/blob/master/docs/Webhook-Parameters.md
|
||||
CMD ["-hooks", "hooks.json", "-hooks", "hooks.yaml", "-hotreload", "-template", "-verbose"]
|
||||
|
||||
Reference in New Issue
Block a user