@@ -55,31 +55,41 @@ RUN dnf update -y && \
5555 dnf clean all && \
5656 rm -rf /var/cache/dnf /var/cache/yum
5757
58+ ENV GOPATH=/go
59+ ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
5860ARG GOLANG_VERSION=1.23.6
59- ARG GOLANG_SHA256=9379441ea310de000f33a4dc767bd966e72ab2826270e038e78b2c53c2e7802d
60- ENV GOPATH /go
61- ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
62- RUN url="https://dl.google.com/go/go${GOLANG_VERSION}.linux-amd64.tar.gz" && \
63- wget --no-verbose -O go.tgz "$url" && \
61+ RUN set -e; case "$(uname -m)" in \
62+ "x86_64" ) GOLANG_ARCH="amd64" GOLANG_SHA256="9379441ea310de000f33a4dc767bd966e72ab2826270e038e78b2c53c2e7802d" ;; \
63+ "aarch64" ) GOLANG_ARCH="arm64" GOLANG_SHA256="561c780e8f4a8955d32bf72e46af0b5ee5e0debe1e4633df9a03781878219202" ;; \
64+ *) echo "Unsupported $(uname -m)" ; exit 1;; \
65+ esac && \
66+ wget --no-verbose -O go.tgz "https://dl.google.com/go/go${GOLANG_VERSION}.linux-${GOLANG_ARCH}.tar.gz" && \
6467 echo "${GOLANG_SHA256} *go.tgz" | sha256sum -c - && \
6568 tar -C /usr/local -xzf go.tgz && \
6669 rm go.tgz && \
6770 mkdir -p "$GOPATH/src" "$GOPATH/bin" && \
6871 chmod -R 777 "$GOPATH"
6972
70- ARG FETCH_VERSION=0.3.5
71- ARG FETCH_SHA256=8d4d99e903b30dbd24290e9a056a982ea2326a05ded24c63be64df16e7e0d9f0
72- RUN wget --no-verbose -O fetch https://github.com/gruntwork-io/fetch/releases/download/v${FETCH_VERSION}/fetch_linux_amd64 && \
73+ ARG FETCH_VERSION=0.4.6
74+ RUN set -e; case "$(uname -m)" in \
75+ "x86_64" ) FETCH_ARCH="amd64" FETCH_SHA256="a67ed3141d6deb7e7841f40505cba11eb7a37abbab78374712a42373e7854209" ;; \
76+ "aarch64" ) FETCH_ARCH="arm64" FETCH_SHA256="4b9115a1f1a90c7088bff9ffc7d2de3547ef1d21709528e878af09a4c348dea3" ;; \
77+ *) echo "Unsupported $(uname -m)" ; exit 1;; \
78+ esac && \
79+ wget --no-verbose -O fetch https://github.com/gruntwork-io/fetch/releases/download/v${FETCH_VERSION}/fetch_linux_${FETCH_ARCH} && \
7380 echo "${FETCH_SHA256} fetch" | sha256sum -c - && \
7481 install fetch /usr/bin && \
7582 rm fetch
7683
7784ARG OSSLS_VERSION=0.11.1
78- ARG OSSLS_SHA256=f1bf3012961c1d90ba307a46263f29025028d35c209b9a65e5c7d502c470c95f
79- RUN fetch --repo="https://github.com/stackrox/ossls" --tag="${OSSLS_VERSION}" --release-asset="ossls_linux_amd64" . && \
80- echo "${OSSLS_SHA256} *ossls_linux_amd64" | sha256sum -c - && \
81- install ossls_linux_amd64 /usr/bin/ossls && \
82- rm ossls_linux_amd64 && \
85+ RUN set -e; case "$(uname -m)" in \
86+ "x86_64" ) OSSLS_ARCH="amd64" OSSLS_SHA256="f1bf3012961c1d90ba307a46263f29025028d35c209b9a65e5c7d502c470c95f" ;; \
87+ *) echo "Unsupported $(uname -m), skipping." ; exit 0;; \
88+ esac && \
89+ fetch --repo="https://github.com/stackrox/ossls" --tag="${OSSLS_VERSION}" --release-asset="ossls_linux_${OSSLS_ARCH}" . && \
90+ echo "${OSSLS_SHA256} *ossls_linux_${OSSLS_ARCH}" | sha256sum -c - && \
91+ install ossls_linux_${OSSLS_ARCH} /usr/bin/ossls && \
92+ rm ossls_linux_${OSSLS_ARCH} && \
8393 ossls version
8494
8595ENV CGO_ENABLED=1
0 commit comments