File tree Expand file tree Collapse file tree 1 file changed +12
-18
lines changed Expand file tree Collapse file tree 1 file changed +12
-18
lines changed Original file line number Diff line number Diff line change 1
- FROM golang:1.12.6-alpine as build
2
- WORKDIR ${GOPATH}/src/github.com/quintoandar
3
- RUN apk update && apk add make git curl && git clone https://github.com/quintoandar/postgres_exporter.git
4
- WORKDIR ${GOPATH}/src/github.com/quintoandar/postgres_exporter
5
- RUN go get -u github.com/prometheus/promu
6
- RUN make build
7
- RUN chmod +x postgres_exporter && mv postgres_exporter /tmp/postgres_exporter
8
-
9
-
10
- FROM quay.io/prometheus/busybox:latest as final
11
-
12
- COPY --from=build ["/tmp/postgres_exporter" , "/" ]
13
-
14
- WORKDIR /opt/exporter
15
-
16
- EXPOSE 9187
17
-
18
- ENTRYPOINT [ "/postgres_exporter" ]
1
+ ARG ARCH="amd64"
2
+ ARG OS="linux"
3
+ FROM quay.io/prometheus/busybox-${OS}-${ARCH}:latest
4
+ LABEL maintainer=
"The Prometheus Authors <[email protected] >"
5
+
6
+ ARG ARCH="amd64"
7
+ ARG OS="linux"
8
+ COPY .build/${OS}-${ARCH}/postgres_exporter /bin/postgres_exporter
9
+
10
+ EXPOSE 9187
11
+ USER nobody
12
+ ENTRYPOINT [ "/bin/postgres_exporter" ]
You can’t perform that action at this time.
0 commit comments