From 95c1239e5c5b8292b7b91994a77f40e16ad2ecd7 Mon Sep 17 00:00:00 2001 From: Victor Date: Sat, 5 Sep 2026 07:57:45 +0200 Subject: [PATCH] add aarch64 support --- .woodpecker/build.yaml | 2 +- Dockerfile | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.woodpecker/build.yaml b/.woodpecker/build.yaml index 6aaabab..2db26b8 100644 --- a/.woodpecker/build.yaml +++ b/.woodpecker/build.yaml @@ -4,7 +4,7 @@ steps: settings: repo: git.kolspace.cc/victor.kolomin/docker-rustic-backup registry: git.kolspace.cc - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 username: from_secret: gitea_registry_user password: diff --git a/Dockerfile b/Dockerfile index b06013f..5e9938b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,12 +11,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ cron bash curl tzdata ca-certificates && \ rm -rf /var/lib/apt/lists/* -RUN curl -L https://github.com/rustic-rs/rustic/releases/download/${RUSTIC_VERSION}/rustic-${RUSTIC_VERSION}-x86_64-unknown-linux-musl.tar.gz \ -# RUN curl -L https://github.com/rustic-rs/rustic/releases/download/v0.10.2/rustic-v0.10.2-1-g189b17c-x86_64-unknown-linux-musl.tar.gz \ - | tar -xvzf - -C /usr/local/bin rustic && \ - \ - curl -L -o /usr/local/bin/mc https://dl.min.io/client/mc/release/linux-amd64/mc && \ - \ +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "$ARCH" in \ + x86_64) RUSTIC_ARCH="x86_64-unknown-linux-musl"; MC_ARCH="linux-amd64" ;; \ + aarch64) RUSTIC_ARCH="aarch64-unknown-linux-musl"; MC_ARCH="linux-arm64" ;; \ + *) echo "Unsupported architecture: $ARCH" && exit 1 ;; \ + esac; \ + curl -L "https://github.com/rustic-rs/rustic/releases/download/${RUSTIC_VERSION}/rustic-${RUSTIC_VERSION}-${RUSTIC_ARCH}.tar.gz" \ + | tar -xvzf - -C /usr/local/bin rustic && \ + curl -L -o /usr/local/bin/mc "https://dl.min.io/client/mc/release/${MC_ARCH}/mc" && \ chmod +x /usr/local/bin/rustic /usr/local/bin/mc # --- Configure the shell to auto-source the sanitized environment ---