Skip to content

Commit 411ce99

Browse files
dominikschulzDominik Schulz
authored andcommitted
Use multi-stage Dockerfile
1 parent 79b6110 commit 411ce99

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

Dockerfile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
FROM prom/busybox:glibc
1+
FROM quay.io/prometheus/golang-builder as builder
22

3-
ADD sql_exporter /bin/sql_exporter
3+
ADD . /go/src/github.com/justwatchcom/sql_exporter
4+
WORKDIR /go/src/github.com/justwatchcom/sql_exporter
45

5-
EXPOSE 9237
6-
ENTRYPOINT [ "/bin/sql_exporter" ]
6+
RUN make
7+
8+
FROM quay.io/prometheus/busybox:glibc
9+
MAINTAINER The Prometheus Authors <prometheus-developers@googlegroups.com>
10+
11+
COPY --from=builder /go/src/github.com/justwatchcom/sql_exporter/sql_exporter /bin/sql_exporter
12+
13+
EXPOSE 9237
14+
ENTRYPOINT [ "/bin/sql_exporter" ]

0 commit comments

Comments
 (0)