Skip to content

Commit

Permalink
Properly handle multi-arch container images
Browse files Browse the repository at this point in the history
Signed-off-by: Lance Albertson <[email protected]>
  • Loading branch information
ramereth committed Feb 5, 2025
1 parent 9f36bc8 commit 6f5e9d9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ LABEL maintainer="Cinc Project <[email protected]>"

ARG VERSION=6.8.11
ARG CHANNEL=stable
ARG TARGETARCH
ARG ARCH=x86_64

ENV PATH=/opt/cinc-auditor/bin:/opt/cinc-auditor/embedded/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Expand All @@ -23,6 +24,10 @@ RUN mkdir -p /share

RUN apt-get update && \
apt-get install -y wget rpm2cpio cpio && \
case "$TARGETARCH" in \
amd64) ARCH=x86_64 ;; \
arm64) ARCH=aarch64 ;; \
esac && \
wget "http://ftp-osl.osuosl.org/pub/cinc/files/${CHANNEL}/cinc-auditor/${VERSION}/el/8/cinc-auditor-${VERSION}-1.el8.${ARCH}.rpm" -O /tmp/cinc-auditor.rpm && \
rpm2cpio /tmp/cinc-auditor.rpm | cpio -idmv && \
rm -rf /tmp/cinc-auditor.rpm
Expand Down

0 comments on commit 6f5e9d9

Please sign in to comment.