Skip to content

Commit c0a4b1b

Browse files
authored
Merge pull request #421 from anchi205/add-mount-1.4
Cherry-pick: Add mount binary to base image
2 parents db1daf8 + f4d4aea commit c0a4b1b

File tree

7 files changed

+447
-8
lines changed

7 files changed

+447
-8
lines changed

.konflux/shared-resource-webhook/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.23 AS builder
1+
FROM registry.redhat.io/ubi9/go-toolset:1.24 AS builder
22

33
ENV GOEXPERIMENT=strictfipsruntime
44

55
COPY . .
66

77
RUN rm -f /vendor/k8s.io/apimachinery/pkg/util/managedfields/pod.yaml
88

9-
RUN CGO_ENABLED=1 GO111MODULE=on go build -a -mod=vendor -buildvcs=false -ldflags="-s -w" -tags="strictfipsruntime" -o openshift-builds-shared-resource-webhook ./cmd/webhook
9+
RUN CGO_ENABLED=1 GO111MODULE=on go build -a -mod=vendor -buildvcs=false -ldflags="-s -w" -tags="strictfipsruntime" -o /tmp/openshift-builds-shared-resource-webhook ./cmd/webhook
1010

1111
FROM registry.access.redhat.com/ubi9-minimal:9.6
1212

1313
WORKDIR /
1414

15-
COPY --from=builder /openshift-builds-shared-resource-webhook .
15+
COPY --from=builder /tmp/openshift-builds-shared-resource-webhook .
1616
COPY LICENSE /licenses/
1717

1818
ENTRYPOINT ["./openshift-builds-shared-resource-webhook"]

.konflux/shared-resource/Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
1-
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.23 AS builder
1+
FROM registry.redhat.io/ubi9/go-toolset:1.24 AS builder
22

33
ENV GOEXPERIMENT=strictfipsruntime
44

55
COPY . .
66

77
RUN rm -f /vendor/k8s.io/apimachinery/pkg/util/managedfields/pod.yaml
88

9-
RUN CGO_ENABLED=1 GO111MODULE=on go build -a -mod=vendor -buildvcs=false -ldflags="-s -w" -tags="strictfipsruntime" -o openshift-builds-shared-resource ./cmd/csidriver
9+
RUN CGO_ENABLED=1 GO111MODULE=on go build -a -mod=vendor -buildvcs=false -ldflags="-s -w" -tags="strictfipsruntime" -o /tmp/openshift-builds-shared-resource ./cmd/csidriver
1010

1111
FROM registry.access.redhat.com/ubi9-minimal:9.6
1212

13+
RUN \
14+
microdnf --assumeyes --nodocs install util-linux && \
15+
microdnf clean all && \
16+
rm -rf /var/cache/yum
17+
1318
WORKDIR /
1419

15-
COPY --from=builder /openshift-builds-shared-resource .
20+
COPY --from=builder /tmp/openshift-builds-shared-resource .
1621
COPY LICENSE /licenses/
1722

1823
ENTRYPOINT ["./openshift-builds-shared-resource"]

.tekton/openshift-builds-shared-resource-pull-request.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ spec:
3636
value: "true"
3737
- name: hermetic
3838
value: "true"
39+
- name: prefetch-dev-package-managers
40+
value: "true"
3941
- name: build-platforms
4042
value:
4143
- linux/x86_64
4244
- linux/arm64
4345
- name: prefetch-input
44-
value: '{"packages": [{"type": "gomod"}]}'
46+
value: '{"packages": [{"type": "gomod"},{"type": "rpm"}]}'
4547
pipelineRef:
4648
resolver: git
4749
params:

.tekton/openshift-builds-shared-resource-push.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,16 @@ spec:
3434
value: "true"
3535
- name: hermetic
3636
value: "true"
37+
- name: prefetch-dev-package-managers
38+
value: "true"
3739
- name: build-platforms
3840
value:
3941
- linux/x86_64
4042
- linux/arm64
4143
- linux/ppc64le
4244
- linux/s390x
4345
- name: prefetch-input
44-
value: '{"packages": [{"type": "gomod"}]}'
46+
value: '{"packages": [{"type": "gomod"},{"type": "rpm"}]}'
4547
pipelineRef:
4648
resolver: git
4749
params:

rpms.in.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
contentOrigin:
2+
repofiles:
3+
- ./ubi.repo
4+
packages: [util-linux]
5+
arches: [x86_64, aarch64, s390x, ppc64le]

0 commit comments

Comments
 (0)