Skip to content

Commit 41f739a

Browse files
committed
next: add golang fips tags, and use ubi instead of minimal
add fips GOEXPERIMENT and golang build tags use ubi and not ubi minimal as the openssh-clients package has dependencies which are available in ubi and not ubi-minimal
1 parent 3292712 commit 41f739a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.konflux/dockerfiles/git-init.Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
ARG GO_BUILDER=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.23
2-
ARG RUNTIME=registry.access.redhat.com/ubi9/ubi-minimal:latest@sha256:92b1d5747a93608b6adb64dfd54515c3c5a360802db4706765ff3d8470df6290
2+
# note: use ubi image instead of ubi-minimal to avoid issues openssh-clients needing deps only available in ubi
3+
ARG RUNTIME=registry.access.redhat.com/ubi9/ubi@sha256:304b50df1ea4db9706d8a30f4bbf26f582936ebc80c7e075c72ff2af99292a54
34

45
FROM $GO_BUILDER AS builder
56

@@ -9,7 +10,8 @@ COPY .konflux/patches patches/
910
RUN set -e; for f in patches/*.patch; do echo ${f}; [[ -f ${f} ]] || continue; git apply ${f}; done
1011
COPY head HEAD
1112
ENV GODEBUG="http2server=0"
12-
RUN cd image/git-init && go build -ldflags="-X 'knative.dev/pkg/changeset.rev=$(cat HEAD)'" -mod=vendor -v -o /tmp/tektoncd-catalog-git-clone
13+
ENV GOEXPERIMENT=strictfipsruntime
14+
RUN cd image/git-init && go build -ldflags="-X 'knative.dev/pkg/changeset.rev=$(cat HEAD)'" -mod=vendor -tags strictfipsruntime -v -o /tmp/tektoncd-catalog-git-clone
1315

1416
FROM $RUNTIME
1517
ARG VERSION=git-init-next
@@ -18,7 +20,7 @@ ENV BINARY=git-init \
1820
KO_APP=/ko-app \
1921
KO_DATA_PATH=/kodata
2022

21-
RUN microdnf install -y openssh-clients git git-lfs shadow-utils
23+
RUN dnf install -y openssh-clients git git-lfs shadow-utils
2224

2325
COPY --from=builder /tmp/tektoncd-catalog-git-clone ${KO_APP}/${BINARY}
2426
COPY head ${KO_DATA_PATH}/HEAD

0 commit comments

Comments
 (0)