1
1
ARG GO_BUILDER=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.23
2
- # note: use ubi image instead of ubi-minimal to avoid issues openssh-clients needing deps only available in ubi
3
- ARG RUNTIME=registry.redhat.io/ubi9/ubi-minimal@sha256:f172b3082a3d1bbe789a1057f03883c1113243564f01cd3020e27548b911d3f8
2
+ ARG RUNTIME=registry.access.redhat.com/ubi9/ubi-minimal:latest@sha256:383329bf9c4f968e87e85d30ba3a5cb988a3bbde28b8e4932dcd3a025fd9c98c
4
3
5
4
FROM $GO_BUILDER AS builder
6
5
7
- WORKDIR /go/src/github.com/tektoncd-catalog/git-clone
8
- COPY upstream .
9
- COPY .konflux/patches patches/
10
- RUN set -e; for f in patches/*.patch; do echo ${f}; [[ -f ${f} ]] || continue; git apply ${f}; done
11
- COPY head HEAD
6
+ COPY image/git-init .
12
7
ENV GODEBUG="http2server=0"
13
- ENV GOEXPERIMENT=strictfipsruntime
14
- 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
15
-
16
- FROM $RUNTIME
17
- ARG VERSION =git-init-1.19
18
-
19
- ENV BINARY=git-init \
20
- KO_APP=/ko-app \
21
- KO_DATA_PATH=/kodata
22
-
23
- RUN microdnf install -y openssh-clients git git-lfs shadow-utils
24
-
25
- COPY --from=builder /tmp/tektoncd-catalog-git-clone ${KO_APP}/${BINARY }
26
- COPY head ${KO_DATA_PATH}/HEAD
27
- RUN chgrp -R 0 ${KO_APP} && \
28
- chmod -R g+rwX ${KO_APP}
29
-
30
- LABEL \
31
- com.redhat.component= "openshift- pipelines-git-init-rhel9-container " \
32
- name= "openshift-pipelines/pipelines-git- init-rhel9 " \
33
- version=$VERSION \
34
- summary= "Red Hat OpenShift Pipelines Git-init " \
35
- maintainer =
"pipelines[email protected] " \
36
- description= "Red Hat OpenShift Pipelines Git-init" \
37
- io.k8s.display-name= "Red Hat OpenShift Pipelines Git-init" \
38
- io.k8s.description= "Red Hat OpenShift Pipelines Git-init" \
39
- io.openshift.tags= "pipelines,tekton,openshift"
40
-
41
- RUN groupadd -r -g 65532 nonroot && useradd --no-log-init -r -u 65532 -g nonroot -d /home/git -m nonroot
42
- USER 65532
43
-
44
- ENTRYPOINT ["/ko-app/git-init" ]
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"]
0 commit comments