Skip to content

Commit

Permalink
dockerfile: use multi-stage dockerfile to build small alpine image
Browse files Browse the repository at this point in the history
  • Loading branch information
while-loop committed Dec 9, 2017
1 parent a29f3e3 commit bf9f9cf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
FROM golang:alpine
FROM golang:alpine as builder

ENV PATH=${PATH}:${GOPATH}/bin

RUN apk update && apk add git
RUN go get github.com/while-loop/remember-me/remme/...

FROM alpine:latest
COPY --from=builder /go/bin/ /usr/local/bin/
RUN remme version

CMD ["remmed"]

0 comments on commit bf9f9cf

Please sign in to comment.