2
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2026-01-02 02:57:26 +01:00

update webhook

This commit is contained in:
kev
2019-01-09 18:59:22 +08:00
parent 308237e3ad
commit 15cec50abe
8 changed files with 30 additions and 59 deletions

View File

@@ -2,22 +2,20 @@
# Dockerfile for webhook
#
FROM golang:alpine AS build
ENV CGO_ENABLED=0
ENV GOOS=linux
ENV GOARCH=amd64
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
MAINTAINER kev <noreply@easypi.pro>
RUN set -xe \
&& apk add -U bash \
coreutils \
curl \
jq \
&& rm -rf /var/cache/apk/*
COPY ./webhook /usr/local/bin/
WORKDIR /scripts
VOLUME /scripts
RUN apk add --no-cache bash coreutils curl jq
COPY --from=build /go/bin/webhook /usr/local/bin/
VOLUME /etc/webhook
EXPOSE 9000
ENTRYPOINT ["webhook"]
CMD ["-help"]
CMD ["-header", "Access-Control-Allow-Origin=*", "-hooks", "/etc/webhook/hooks.json", "-verbose"]