Skip to content

Commit

Permalink
Update Dockerfile.
Browse files Browse the repository at this point in the history
Uses multi-stage building.
Update go version to latest. Closes #9.
  • Loading branch information
mtricht committed Aug 3, 2017
1 parent 59cf94a commit 331bd47
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
FROM alpine:3.4

RUN apk --no-cache add ca-certificates

# Credits to MailHog
RUN apk --no-cache add --virtual build-dependencies go git build-base \
&& mkdir -p /root/gocode \
&& export GOPATH=/root/gocode \
&& go get github.com/swordbeta/trello-burndown \
&& mv /root/gocode/bin/trello-burndown /usr/local/bin \
&& rm -rf /root/gocode \
&& apk del --purge build-dependencies build-base
FROM golang:alpine as builder
RUN apk add --no-cache git build-base
RUN go get -v github.com/swordbeta/trello-burndown

FROM alpine
WORKDIR /root
ENTRYPOINT ["trello-burndown"]
COPY --from=builder /go/bin/trello-burndown /app/trello-burndown
ENTRYPOINT ["/app/trello-burndown"]

0 comments on commit 331bd47

Please sign in to comment.