Skip to content

Commit d484323

Browse files
authored
Merge pull request BonnierNews#5 from davidkarlsen/master
Multi-stage build for minimal image
2 parents a14144f + 365c70c commit d484323

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
FROM golang:1.6
2-
LABEL maintainer [email protected]
3-
EXPOSE 9198
1+
FROM golang:1.8 as golang
42
RUN go get -u github.com/kardianos/govendor && \
53
go get -u github.com/DagensNyheter/logstash_exporter && \
64
cd $GOPATH/src/github.com/DagensNyheter/logstash_exporter && \
7-
govendor build +local && \
8-
mv /go/bin/logstash_exporter /
5+
govendor build +local
6+
7+
FROM quay.io/prometheus/busybox:glibc
8+
COPY --from=golang /go/bin/logstash_exporter /
9+
LABEL maintainer [email protected]
10+
EXPOSE 9198
911
ENTRYPOINT ["/logstash_exporter"]

0 commit comments

Comments
 (0)