Changes webhooks Dockerfile to use docker/compose as base image

This commit is contained in:
Abhinav Sarkar 2019-05-25 14:09:00 +00:00
parent 978c24093d
commit cf53e94914

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/github.com/adnanh/webhook
ENV WEBHOOK_VERSION 2.6.9
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 && \
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 redeploy-site.sh /var/scripts/redeploy-site.sh
CMD ["-verbose", "-hooks=/etc/webhook/hooks.json"]
ENTRYPOINT ["/usr/local/bin/webhook", "-verbose", "-hooks=/etc/webhook/hooks.json"]