From ac5a60cde52970d0212c1a531788507c9411e09f Mon Sep 17 00:00:00 2001 From: Jaime Yera Hidalgo <106755265+jaimeyh@users.noreply.github.com> Date: Wed, 5 Jun 2024 11:47:40 +0200 Subject: [PATCH] =?UTF-8?q?=C3=9CPDATE=20ubi=20base=20image=20in=20order?= =?UTF-8?q?=20to=20fix=20OS=20vulnerabilities=20(#101)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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