diff --git a/Dockerfile b/Dockerfile index 577fd77bd..be6013333 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20.4 as base +FROM golang:1.20.4 AS base ARG VERSION ARG GIT_COMMIT ARG DATE @@ -6,19 +6,19 @@ ARG TARGETARCH WORKDIR /go/src/github.com/prometheus-community/postgres_exporter -FROM base as builder +FROM base AS builder COPY . . RUN go mod tidy RUN make build RUN cp postgres_exporter /bin/postgres_exporter -FROM scratch as scratch +FROM scratch AS scratch COPY --from=builder /bin/postgres_exporter /bin/postgres_exporter EXPOSE 9187 USER 59000:59000 ENTRYPOINT [ "/bin/postgres_exporter" ] -FROM quay.io/sysdig/sysdig-mini-ubi9:1.3.0 as ubi +FROM quay.io/sysdig/sysdig-mini-ubi9:1.3.2 AS ubi COPY --from=builder /bin/postgres_exporter /bin/postgres_exporter EXPOSE 9187 USER 59000:59000