Skip to content

Commit 11e4dfe

Browse files
Update git-init.Dockerfile
1 parent 778e731 commit 11e4dfe

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.konflux/dockerfiles/git-init.Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ COPY .konflux/patches patches/
99
RUN set -e; for f in patches/*.patch; do echo ${f}; [[ -f ${f} ]] || continue; git apply ${f}; done
1010
COPY head HEAD
1111
ENV GODEBUG="http2server=0"
12-
RUN cd image/git-init && go build -ldflags="-X 'knative.dev/pkg/changeset.rev=${CHANGESET_REV:0:7}'" -mod=vendor -v -o /tmp/tektoncd-catalog-git-clone
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
1313

1414
FROM $RUNTIME
1515
ARG VERSION=git-init-1.15.3
@@ -18,8 +18,12 @@ ENV BINARY=git-init \
1818
KO_APP=/ko-app \
1919
KO_DATA_PATH=/kodata
2020

21+
RUN dnf install -y openssh-clients git git-lfs shadow-utils
22+
2123
COPY --from=builder /tmp/tektoncd-catalog-git-clone ${KO_APP}/${BINARY}
2224
COPY head ${KO_DATA_PATH}/HEAD
25+
RUN chgrp -R 0 ${KO_APP} && \
26+
chmod -R g+rwX ${KO_APP}
2327

2428
LABEL \
2529
com.redhat.component="openshift-pipelines-git-init-rhel8-container" \
@@ -29,10 +33,10 @@ LABEL \
2933
maintainer="[email protected]" \
3034
description="Red Hat OpenShift Pipelines Git-init" \
3135
io.k8s.display-name="Red Hat OpenShift Pipelines Git-init" \
32-
io.k8s.description="Red Hat OpenShift Pipelines Git-init" \
36+
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." \
3337
io.openshift.tags="pipelines,tekton,openshift"
3438

35-
RUN groupadd -r -g 65532 nonroot && useradd --no-log-init -r -u 65532 -g nonroot nonroot
39+
RUN groupadd -r -g 65532 nonroot && useradd --no-log-init -r -u 65532 -g nonroot -d /home/git -m nonroot
3640
USER 65532
3741

3842
ENTRYPOINT ["/ko-app/git-init"]

0 commit comments

Comments
 (0)