20 lines
974 B
Plaintext
20 lines
974 B
Plaintext
# docker buildx build --pull - --platform linux/amd64,linux/arm64 --push --tag quay.io/remram44/restic:0.17.1-psql17 < restic-psql
|
|
|
|
FROM postgres:17
|
|
|
|
RUN apt-get update -yy && \
|
|
apt-get install -yy curl ca-certificates bzip2 sqlite3 && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
ARG RESTIC_VERSION=0.17.1
|
|
ARG TARGETPLATFORM
|
|
|
|
RUN if [ ${TARGETPLATFORM} = "linux/amd64" ]; then SUFFIX=linux_amd64; HASH=bdfaf16fe933136e3057e64e28624f2e0451dbd47e23badb2d37dbb60fdb6a70; \
|
|
elif [ ${TARGETPLATFORM} = "linux/arm64" ]; then SUFFIX=linux_arm64; HASH=aa9d86ac5f261f6a8295d5503bb27761ba7fe1fc1cf26fa52e7ab249b9a04716; \
|
|
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 > /opt/restic && \
|
|
chmod +x /opt/restic
|