Skip to content

Commit

Permalink
review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
bdunne committed Oct 2, 2024
1 parent 2eeca29 commit 8d53640
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions manageiq-operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ COPY go.mod /go.mod

RUN microdnf -y install gzip jq tar && \
arch=$(uname -m) && \
if [ ${arch} == "x86_64" ] ; then \
arch="amd64" \
; fi && \
if [ ${arch} == "x86_64" ]; then arch="amd64"; fi && \
goversion=$(sed -nr 's/^go\s+(.*)/go\1/p' /go.mod) && \
file=$(curl -s 'https://go.dev/dl/?mode=json&include=all' | jq -r --arg GOVERSION "${goversion}" --arg ARCH "${arch}" 'map(select(.version | startswith($GOVERSION)))[0].files[] | select(.arch == $ARCH and .os == "linux").filename') && \
file=$(curl -s 'https://go.dev/dl/?mode=json&include=all' | jq -r --arg GOVERSION "${goversion}" --arg ARCH "${arch}" 'first(.[] | select(.version | startswith($GOVERSION))).files[] | select(.arch == $ARCH and .os == "linux").filename') && \
curl -s -f -L https://go.dev/dl/${file} | tar -C / -xzf -

ENV PATH=/go/bin:/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Expand Down

0 comments on commit 8d53640

Please sign in to comment.