Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: percona/postgres_exporter
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: quintoandar/postgres_exporter
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 6 commits
  • 1 file changed
  • 2 contributors

Commits on Jun 20, 2024

  1. Using 5A Dockerfile

    gfranco9 committed Jun 20, 2024
    Copy the full SHA
    a0fd032 View commit details
  2. .

    gfranco9 committed Jun 20, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    ruyadorno Ruy Adorno
    Copy the full SHA
    4887578 View commit details
  3. .

    gfranco9 committed Jun 20, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    targos Michaël Zasso
    Copy the full SHA
    f834bd3 View commit details
  4. Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    3509d89 View commit details
  5. Updating golang to 1.21

    gfranco9 committed Jun 20, 2024
    Copy the full SHA
    300ebbb View commit details
  6. Copy the full SHA
    d0c1218 View commit details
Showing with 18 additions and 12 deletions.
  1. +18 −12 Dockerfile
30 changes: 18 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
ARG ARCH="amd64"
ARG OS="linux"
FROM quay.io/prometheus/busybox-${OS}-${ARCH}:latest
LABEL maintainer="The Prometheus Authors <prometheus-developers@googlegroups.com>"

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

EXPOSE 9187
USER nobody
ENTRYPOINT [ "/bin/postgres_exporter" ]
FROM golang:1.21-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 alpine:3.18 as final

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

WORKDIR /opt/exporter

EXPOSE 9187

ENTRYPOINT [ "/postgres_exporter" ]