From ba36189dd55647b5240f75f5904e05053cf7b353 Mon Sep 17 00:00:00 2001 From: Matthew Kobayashi <1856537+MattKobayashi@users.noreply.github.com> Date: Tue, 8 Oct 2024 16:36:30 +1000 Subject: [PATCH] fix: Install `supercronic` from Alpine repo (#53) --- Dockerfile | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1ee6ff9..d605780 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,27 +2,10 @@ FROM python:3.13.0-alpine3.20 WORKDIR /opt/fuelhook -ARG TARGETPLATFORM -ENV SUPERCRONIC_SHA1SUM_amd64=cd48d45c4b10f3f0bfdd3a57d054cd05ac96812b \ - SUPERCRONIC_SHA1SUM_arm=75e065bf0909f920b06d5bd797c0e6b31e68b112 \ - SUPERCRONIC_SHA1SUM_arm64=512f6736450c56555e01b363144c3c9d23abed4c \ - SUPERCRONIC_SHA1SUM_i386=3436985298ce241d7d9477eb9eab164b582717a8 \ - SUPERCRONIC_VERSION=v0.2.29 - -RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then ARCH=amd64; elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then ARCH=arm; elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then ARCH=arm64; elif [ "$TARGETPLATFORM" = "linux/i386" ]; then ARCH=i386; else exit 1; fi \ - && export SUPERCRONIC="supercronic-linux-${ARCH}" \ - && export SUPERCRONIC_URL="https://github.com/aptible/supercronic/releases/download/${SUPERCRONIC_VERSION}/${SUPERCRONIC}" \ - && wget "$SUPERCRONIC_URL" \ - && eval SUPERCRONIC_SHA1SUM='$SUPERCRONIC_SHA1SUM_'$ARCH \ - && 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 \ - && addgroup -S fuelhook && adduser -S fuelhook -G fuelhook \ +RUN addgroup -S fuelhook && adduser -S fuelhook -G fuelhook \ && mkdir -p data \ && chown fuelhook:fuelhook data \ - && apk --no-cache upgrade \ - && apk add --no-cache tzdata + && apk --no-cache add supercronic tzdata USER fuelhook