Changes webhooks Dockerfile to use docker/compose as base image

Abhinav Sarkar 2019-05-25 14:09:00 +00:00
parent 978c24093d
commit cf53e94914
1 changed files with 14 additions and 4 deletions

View File

@ -1,7 +1,17 @@
FROM almir/webhook
RUN apk add --update docker py-pip heirloom-mailx \
&& pip install docker-compose \
FROM golang:alpine3.9 AS build
WORKDIR /go/src/
RUN apk add --update -t build-deps curl libc-dev gcc libgcc
RUN curl -L --silent -o webhook.tar.gz${WEBHOOK_VERSION}.tar.gz && \
tar -xzf webhook.tar.gz --strip 1 && \
go get -d && \
go build -o /usr/local/bin/webhook
FROM docker/compose:1.22.0
COPY --from=build /usr/local/bin/webhook /usr/local/bin/webhook
VOLUME ["/etc/webhook"]
RUN apk add --update heirloom-mailx \
&& rm -rf /var/cache/apk/*
COPY hooks.json /etc/webhook/hooks.json
COPY /var/scripts/
CMD ["-verbose", "-hooks=/etc/webhook/hooks.json"]
ENTRYPOINT ["/usr/local/bin/webhook", "-verbose", "-hooks=/etc/webhook/hooks.json"]