Skip to content

Commit

Permalink
Set ubi-miminal docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-nguyen7 committed Aug 17, 2023
1 parent 1ffa2f0 commit 0b501db
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 0b501db

Please sign in to comment.