File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 1- ARG ARCH="amd64"
2- ARG OS="linux"
3- FROM quay.io/prometheus/busybox-${OS}-${ARCH}:latest
1+
2+ FROM golang:1.19-alpine as build
3+ WORKDIR ${GOPATH}/src/github.com/quintoandar
4+ RUN apk update && apk add make git curl && git clone --branch main https://github.com/quintoandar/postgres_exporter.git
5+ WORKDIR ${GOPATH}/src/github.com/quintoandar/postgres_exporter
6+ RUN make release
7+ RUN chmod +x postgres_exporter && mv postgres_exporter /tmp/postgres_exporter
8+
9+ FROM quay.io/prometheus/busybox:latest as final
410LABEL maintainer="The Prometheus Authors <prometheus-developers@googlegroups.com>"
511
6- ARG ARCH="amd64"
7- ARG OS="linux"
8- COPY .build/${OS}-${ARCH}/postgres_exporter /bin/postgres_exporter
12+ COPY --from=build ["/tmp/postgres_exporter" , "/bin/postgres_exporter" ]
913
1014EXPOSE 9187
1115USER nobody
You can’t perform that action at this time.
0 commit comments