Skip to content

Commit 2367a8d

Browse files
authored
docker: switch to wolfi base images (#5)
Use wolfi base image. --------- Signed-off-by: Max Englander <[email protected]>
1 parent 74e70ed commit 2367a8d

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

Dockerfile

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
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]>"
1+
FROM --platform=$BUILDPLATFORM pscale.dev/wolfi-prod/go:1.23 AS build
2+
ARG TARGETOS
3+
ARG TARGETARCH
4+
RUN apk --no-cache add curl
5+
COPY . /postgres_exporter
6+
RUN rm -f /postgres_exporter/postgres_exporter
7+
RUN CGO_ENABLED=0 GOOS="$TARGETOS" GOARCH="$TARGETARCH" make -C /postgres_exporter build
58

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" ]
9+
FROM pscale.dev/wolfi-prod/base:latest
10+
COPY --from=build /postgres_exporter/postgres_exporter /bin/postgres_exporter
11+
EXPOSE 9187
12+
USER nobody
13+
WORKDIR /
14+
ENTRYPOINT ["/bin/postgres_exporter"]

0 commit comments

Comments
 (0)