Skip to content

Commit

Permalink
Use multi-stage docker build w/ go1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
discordianfish committed Nov 10, 2017
1 parent d27432d commit 2d81d6e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 141 deletions.
13 changes: 10 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
FROM sdurrheimer/alpine-golang-make-onbuild
MAINTAINER The Prometheus Authors <[email protected]>
FROM golang:1.9
WORKDIR /go/src/github.com/discordianfish/nginx_exporter
COPY . .
RUN go get -d && go build

EXPOSE 9113

FROM quay.io/prometheus/busybox:glibc
EXPOSE 9113
COPY --from=0 /go/src/github.com/discordianfish/nginx_exporter/nginx_exporter /bin/
USER nobody
ENTRYPOINT [ "/bin/nginx_exporter" ]
17 changes: 0 additions & 17 deletions Makefile

This file was deleted.

121 changes: 0 additions & 121 deletions Makefile.COMMON

This file was deleted.

0 comments on commit 2d81d6e

Please sign in to comment.