From 0b501dbf63ddd833ad6aa55296f4aa8adb801f9d Mon Sep 17 00:00:00 2001 From: Sam Nguyen Date: Thu, 17 Aug 2023 09:39:16 -0400 Subject: [PATCH] Set ubi-miminal docker image --- Dockerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index ae8dd6a..27f1d5d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,18 @@ -FROM --platform=$BUILDPLATFORM golang:1.19-alpine3.16 as builder +FROM registry.access.redhat.com/ubi8/ubi-minimal:latest as builder -RUN apk add --update --no-cache ca-certificates tzdata git make bash && update-ca-certificates +RUN microdnf install go-toolset make ADD . /opt WORKDIR /opt # Run this before `make token-refresher` to be friendy with Docker image layer cache. -RUN make vendor +# RUN make vendor ARG TARGETOS TARGETARCH RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} make token-refresher -FROM scratch as runner +FROM registry.access.redhat.com/ubi8/ubi-minimal:latest -COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY --from=builder /opt/token-refresher /bin/token-refresher ARG BUILD_DATE