Skip to content

Commit

Permalink
Simplify "Dockerfile".
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Jun 9, 2018
1 parent 09ed913 commit 887ce43
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
FROM golang:alpine3.7
FROM golang:alpine

WORKDIR /go/src/github.com/adnanh/webhook

ENV PACKAGE webhook
ENV VERSION 2.6.8
ENV URL https://github.com/adnanh/${PACKAGE}/archive/${VERSION}.tar.gz

RUN apk add --update -t build-deps curl gcc libc-dev libgcc
RUN curl -L -o ${PACKAGE}.tar.gz https://github.com/adnanh/${PACKAGE}/archive/${VERSION}.tar.gz && \
RUN curl -L -o ${PACKAGE}.tar.gz ${URL} && \
tar -xzf ${PACKAGE}.tar.gz --strip 1 && \
go get -d && \
go build -o /usr/local/bin/${PACKAGE} && \
apk del --purge build-deps && \
rm -rf /var/cache/apk/* && \
rm -rf /go
go build -o /usr/local/bin/${PACKAGE}

FROM alpine:3.7
FROM alpine

RUN apk add --update bash git && \
rm -rf /var/cache/apk/*
Expand Down

0 comments on commit 887ce43

Please sign in to comment.