Make Restic rest-server multiarch
This commit is contained in:
parent
77ef635941
commit
82d252167f
|
@ -1,8 +1,16 @@
|
||||||
|
# docker buildx build --pull - --platform linux/amd64,linux/arm64 --push --tag quay.io/remram44/restic-server:0.13.0-restic0.17.0 < restic-server
|
||||||
|
|
||||||
FROM python:3.12 AS client
|
FROM python:3.12 AS client
|
||||||
|
|
||||||
RUN curl -fLo /restic.bz2 https://github.com/restic/restic/releases/download/v0.17.0/restic_0.17.0_linux_amd64.bz2 && \
|
ARG RESTIC_VERSION=0.17.0
|
||||||
printf "fec7ade9f12c30bd6323568dbb0f81a3f98a3c86acc8161590235c0f18194022 /restic.bz2\\n" | sha256sum -c && \
|
ARG TARGETPLATFORM
|
||||||
bunzip2 /restic.bz2 && \
|
|
||||||
|
RUN if [ ${TARGETPLATFORM} = "linux/amd64" ]; then SUFFIX=linux_amd64; HASH=fec7ade9f12c30bd6323568dbb0f81a3f98a3c86acc8161590235c0f18194022; \
|
||||||
|
elif [ ${TARGETPLATFORM} = "linux/arm64" ]; then SUFFIX=linux_arm64; HASH=f9ad4d91c181da2968ccdecb5238bf872f824fe1e40253f3347c4025192f19c9; \
|
||||||
|
else echo "no URL for $(TARGETPLATFORM)"; exit 1; fi && \
|
||||||
|
curl -Lo /tmp/restic.bz2 https://github.com/restic/restic/releases/download/v${RESTIC_VERSION}/restic_${RESTIC_VERSION}_${SUFFIX}.bz2 && \
|
||||||
|
printf "${HASH} /tmp/restic.bz2\\n" | sha256sum -c && \
|
||||||
|
bunzip2 < /tmp/restic.bz2 > /restic && \
|
||||||
chmod +x /restic
|
chmod +x /restic
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue