Skip to content

Commit

Permalink
adjust supercronic download to allow multiarch builds
Browse files Browse the repository at this point in the history
  • Loading branch information
guidopetri committed Jul 7, 2023
1 parent decbe79 commit b74956c
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,18 @@ RUN DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales \

ENV LC_ALL C.UTF-8

ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.3/supercronic-linux-amd64 \
SUPERCRONIC=supercronic-linux-amd64 \
SUPERCRONIC_SHA1SUM=96960ba3207756bb01e6892c978264e5362e117e

ARG ARCH=amd64
ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.3/supercronic-linux-$ARCH \
SUPERCRONIC=supercronic-linux-$ARCH \
SUPERCRONIC_amd64_SHA1SUM=96960ba3207756bb01e6892c978264e5362e117e \
SUPERCRONIC_arm_SHA1SUM=8c1e7af256ee35a9fcaf19c6a22aa59a8ccc03ef \
SUPERCRONIC_arm64_SHA1SUM=f0e8049f3aa8e24ec43e76955a81b76e90c02270 \
SUPERCRONIC_SHA1SUM="SUPERCRONIC_${ARCH}_SHA1SUM"

# required to make the ${!...} expansion work
SHELL ["/bin/bash", "-c"]
RUN curl -fsSLO "$SUPERCRONIC_URL" \
&& echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \
&& echo "${!SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \
&& chmod +x "$SUPERCRONIC" \
&& mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \
&& ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic
Expand Down

0 comments on commit b74956c

Please sign in to comment.