Skip to content

Commit 4887578

Browse files
committed
.
1 parent a0fd032 commit 4887578

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

Dockerfile

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
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" ]

0 commit comments

Comments
 (0)