From 017c7344c3af7d833c0d05459b4fb0058c4ae87c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arda=20G=C3=BC=C3=A7l=C3=BC?= Date: Thu, 2 May 2024 09:40:37 +0300 Subject: [PATCH] Use oc.rhel8 based on the target arch of image --- Dockerfile.rhel7 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile.rhel7 b/Dockerfile.rhel7 index ebf77ea76..7f9d7b5fc 100644 --- a/Dockerfile.rhel7 +++ b/Dockerfile.rhel7 @@ -7,5 +7,10 @@ FROM registry.ci.openshift.org/ocp/4.16:cli-artifacts as cli-artifacts FROM registry.ci.openshift.org/ocp/4.16:cli COPY --from=builder /go/src/github.com/openshift/must-gather/collection-scripts/* /usr/bin/ -COPY --from=cli-artifacts /usr/share/openshift/linux_amd64/oc.rhel8 /usr/bin/oc +COPY --from=cli-artifacts /usr/share/openshift/linux_amd64/oc.rhel8 /usr/share/openshift/linux_amd64/oc +COPY --from=cli-artifacts /usr/share/openshift/linux_arm64/oc.rhel8 /usr/share/openshift/linux_arm64/oc +COPY --from=cli-artifacts /usr/share/openshift/linux_ppc64le/oc.rhel8 /usr/share/openshift/linux_ppc64le/oc + +RUN ln -sf /usr/share/openshift/linux_$(uname -m | sed 's/aarch64/arm64/;s/x86_64/amd64/')/oc /usr/bin/oc + RUN yum install --setopt=tsflags=nodocs -y jq && yum clean all && rm -rf /var/cache/yum/*