Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dockerfile to automate deploy #4

Merged
merged 11 commits into from
Jan 20, 2018
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM quay.io/prometheus/golang-builder AS builder

# Get sql_exporter
ADD . /go/src/github.com/free/sql_exporter
WORKDIR /go/src/github.com/free/sql_exporter

# Do makefile
RUN make

# Make image and copy build sql_exporter
FROM quay.io/prometheus/busybox:glibc
MAINTAINER The Prometheus Authors <[email protected]>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not actually an (official) Prometheus developer, so I'm not sure this is completely right, but I also don't know if it really matters.

COPY --from=builder /go/src/github.com/free/sql_exporter/sql_exporter /bin/sql_exporter

EXPOSE 9399
ENTRYPOINT [ "/bin/sql_exporter" ]