Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
ARG ARCH="amd64"
ARG OS="linux"
FROM quay.io/prometheus/busybox-${OS}-${ARCH}:latest
LABEL maintainer="The Prometheus Authors <[email protected]>"
FROM --platform=$BUILDPLATFORM pscale.dev/wolfi-prod/go:1.23 AS build
ARG TARGETOS
ARG TARGETARCH
RUN apk --no-cache add curl
COPY . /postgres_exporter
RUN rm -f /postgres_exporter/postgres_exporter
RUN CGO_ENABLED=0 GOOS="$TARGETOS" GOARCH="$TARGETARCH" make -C /postgres_exporter build

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

EXPOSE 9187
USER nobody
ENTRYPOINT [ "/bin/postgres_exporter" ]
FROM pscale.dev/wolfi-prod/base:latest
COPY --from=build /postgres_exporter/postgres_exporter /bin/postgres_exporter
EXPOSE 9187
USER nobody
WORKDIR /
ENTRYPOINT ["/bin/postgres_exporter"]