Skip to content

Commit 97cef4a

Browse files
Update git-init.Dockerfile
1 parent 1ac8c01 commit 97cef4a

File tree

1 file changed

+37
-33
lines changed

1 file changed

+37
-33
lines changed

.konflux/dockerfiles/git-init.Dockerfile

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,41 @@ ARG RUNTIME=registry.access.redhat.com/ubi9/ubi-minimal:latest@sha256:383329bf9c
33

44
FROM $GO_BUILDER AS builder
55

6-
COPY image/git-init .
6+
WORKDIR /go/src/github.com/tektoncd-catalog/git-clone
7+
COPY upstream .
8+
COPY .konflux/patches patches/
9+
RUN set -e; for f in patches/*.patch; do echo ${f}; [[ -f ${f} ]] || continue; git apply ${f}; done
10+
COPY head HEAD
711
ENV GODEBUG="http2server=0"
8-
RUN go build -ldflags="-X 'knative.dev/pkg/changeset.rev=${CHANGESET_REV:0:7}'" -mod=vendor -v -o /tmp/tektoncd-catalog-git-clone
9-
#
10-
#FROM $RUNTIME
11-
#
12-
#ENV BINARY=git-init \
13-
# KO_APP=/ko-app \
14-
# KO_DATA_PATH=/kodata
15-
#
16-
#COPY --from=builder /tmp/tektoncd-catalog-git-clone ${KO_APP}/${BINARY}
17-
#
18-
#RUN microdnf install -y openssh-clients git git-lfs shadow-utils && \
19-
# chgrp -R 0 ${KO_APP} && \
20-
# chmod -R g+rwX ${KO_APP}
21-
#
22-
#LABEL \
23-
# com.redhat.component="openshift-pipelines-git-init-rhel8-container" \
24-
# name="openshift-pipelines/pipelines-git-init-rhel8" \
25-
# summary="Red Hat OpenShift Pipelines Git-init" \
26-
# maintainer="pipelines-[email protected]" \
27-
# description="Red Hat OpenShift Pipelines Git-init" \
28-
# io.k8s.display-name="Red Hat OpenShift Pipelines Git-init" \
29-
# io.k8s.description="git-init is a binary that makes it easy to clone a repository from a Tekton Task. It is usually used via the git-clone Tasks." \
30-
# io.openshift.tags="pipelines,tekton,openshift"
31-
#
32-
#WORKDIR /licenses
33-
#
34-
#COPY LICENSE .
35-
## Not adding the user to make sure git+ssh uses HOME to read client configuration
36-
#RUN groupadd -r -g 65532 nonroot && useradd --no-log-init -r -u 65532 -g nonroot -d /home/git -m nonroot
37-
#USER 65532
38-
#
39-
#ENTRYPOINT ["/ko-app/git-init"]
12+
ENV GOEXPERIMENT=strictfipsruntime
13+
RUN cd image/git-init && go build -ldflags="-X 'knative.dev/pkg/changeset.rev=$(cat HEAD)'" -mod=vendor -tags disable_gcp -tags strictfipsruntime -v -o /tmp/tektoncd-catalog-git-clone
14+
15+
FROM $RUNTIME
16+
ARG VERSION=git-init-1.19
17+
18+
ENV BINARY=git-init \
19+
KO_APP=/ko-app \
20+
KO_DATA_PATH=/kodata
21+
22+
RUN microdnf install -y openssh-clients git git-lfs shadow-utils
23+
24+
COPY --from=builder /tmp/tektoncd-catalog-git-clone ${KO_APP}/${BINARY}
25+
COPY head ${KO_DATA_PATH}/HEAD
26+
RUN chgrp -R 0 ${KO_APP} && \
27+
chmod -R g+rwX ${KO_APP}
28+
29+
LABEL \
30+
com.redhat.component="openshift-pipelines-git-init-rhel9-container" \
31+
name="openshift-pipelines/pipelines-git-init-rhel9" \
32+
version=$VERSION \
33+
summary="Red Hat OpenShift Pipelines Git-init" \
34+
maintainer="pipelines[email protected]" \
35+
description="Red Hat OpenShift Pipelines Git-init" \
36+
io.k8s.display-name="Red Hat OpenShift Pipelines Git-init" \
37+
io.k8s.description="git-init is a binary that makes it easy to clone a repository from a Tekton Task. It is usually used via the git-clone Tasks." \
38+
io.openshift.tags="pipelines,tekton,openshift"
39+
40+
RUN groupadd -r -g 65532 nonroot && useradd --no-log-init -r -u 65532 -g nonroot -d /home/git -m nonroot
41+
USER 65532
42+
43+
ENTRYPOINT ["/ko-app/git-init"]

0 commit comments

Comments
 (0)