diff --git a/Dockerfile b/Dockerfile index ae8dd6a..f7e4fe4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ -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 @@ -11,9 +11,8 @@ 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 diff --git a/Makefile b/Makefile index 4f9433b..fd3cb2e 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ README.md: $(EMBEDMD) tmp/help.txt $(EMBEDMD) -w README.md token-refresher: vendor main.go $(wildcard *.go) $(wildcard */*.go) - CGO_ENABLED=0 GOEXPERIMENT=boringcrypto GOOS=$(OS) GOARCH=$(GOARCH) GO111MODULE=on GOPROXY=https://proxy.golang.org go build -mod vendor -a -ldflags '-s -w' -o $@ . + CGO_ENABLED=1 GOEXPERIMENT=boringcrypto GOOS=$(OS) GOARCH=$(GOARCH) GO111MODULE=on GOPROXY=https://proxy.golang.org go build -mod vendor -a -ldflags '-s -w' -o $@ . .PHONY: build build: token-refresher