Permalink
Browse files

Use multi-stage Dockerfile

  • Loading branch information...
dominikschulz authored and Dominik Schulz committed Jul 3, 2017
1 parent 79b6110 commit 411ce999bf4de1fe597f71e6e50b736b7b0d396d
Showing with 12 additions and 4 deletions.
  1. +12 −4 Dockerfile
View
@@ -1,6 +1,14 @@
FROM prom/busybox:glibc
FROM quay.io/prometheus/golang-builder as builder
ADD sql_exporter /bin/sql_exporter
ADD . /go/src/github.com/justwatchcom/sql_exporter
WORKDIR /go/src/github.com/justwatchcom/sql_exporter
EXPOSE 9237
ENTRYPOINT [ "/bin/sql_exporter" ]
RUN make
FROM quay.io/prometheus/busybox:glibc
MAINTAINER The Prometheus Authors <prometheus-developers@googlegroups.com>
COPY --from=builder /go/src/github.com/justwatchcom/sql_exporter/sql_exporter /bin/sql_exporter
EXPOSE 9237
ENTRYPOINT [ "/bin/sql_exporter" ]

0 comments on commit 411ce99

Please sign in to comment.