Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
gfranco9 committed Jun 20, 2024
1 parent a0fd032 commit 4887578
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
FROM golang:1.12.6-alpine as build
WORKDIR ${GOPATH}/src/github.com/quintoandar
RUN apk update && apk add make git curl && git clone https://github.com/quintoandar/postgres_exporter.git
WORKDIR ${GOPATH}/src/github.com/quintoandar/postgres_exporter
RUN go get -u github.com/prometheus/promu
RUN make build
RUN chmod +x postgres_exporter && mv postgres_exporter /tmp/postgres_exporter


FROM quay.io/prometheus/busybox:latest as final

COPY --from=build ["/tmp/postgres_exporter", "/" ]

WORKDIR /opt/exporter

EXPOSE 9187

ENTRYPOINT [ "/postgres_exporter" ]
ARG ARCH="amd64"
ARG OS="linux"
FROM quay.io/prometheus/busybox-${OS}-${ARCH}:latest
LABEL maintainer="The Prometheus Authors <[email protected]>"

ARG ARCH="amd64"
ARG OS="linux"
COPY .build/${OS}-${ARCH}/postgres_exporter /bin/postgres_exporter

EXPOSE 9187
USER nobody
ENTRYPOINT [ "/bin/postgres_exporter" ]

0 comments on commit 4887578

Please sign in to comment.