-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build webhook with stream-command-output support.
For the s3import script seems useful to print the output as it happens, as version 2.8.0 of webhook does not have this functionality we are applying the PR 549 (adnanh/webhook#549) and building the binary for alpine.
- Loading branch information
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,28 @@ | ||
ARG ALPINE_VERSION | ||
|
||
FROM golang:alpine AS builder | ||
LABEL maintainer="Sergio Talens-Oliag <[email protected]>" | ||
WORKDIR /go/src/github.com/adnanh/webhook | ||
RUN apk update &&\ | ||
apk add --no-cache -t build-deps curl libc-dev gcc libgcc patch &&\ | ||
curl -L --silent -o webhook.tar.gz\ | ||
https://github.com/adnanh/webhook/archive/2.8.0.tar.gz &&\ | ||
tar -xzf webhook.tar.gz --strip 1 &&\ | ||
curl -L --silent -o 549.patch\ | ||
https://patch-diff.githubusercontent.com/raw/adnanh/webhook/pull/549.patch &&\ | ||
patch -p1 < 549.patch &&\ | ||
go get -d && \ | ||
go build -o /usr/local/bin/webhook | ||
|
||
FROM alpine:$ALPINE_VERSION | ||
LABEL maintainer="Sergio Talens-Oliag <[email protected]>" | ||
RUN apk update &&\ | ||
apk add --no-cache mailcap nodejs npm util-linux-misc webhook &&\ | ||
apk add --no-cache mailcap nodejs npm util-linux-misc &&\ | ||
apk add --no-cache s3fs-fuse \ | ||
--repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/ &&\ | ||
rm -rf /var/cache/apk/* &&\ | ||
npm install --location=global kyso | ||
COPY --from=builder /usr/local/bin/webhook /usr/local/bin/webhook | ||
COPY entrypoint.sh / | ||
COPY hooks/* /webhook/hooks/ | ||
EXPOSE 9000 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters