-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbackup-container.dockerfile
More file actions
39 lines (31 loc) · 2.22 KB
/
backup-container.dockerfile
File metadata and controls
39 lines (31 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM ubuntu:24.04
RUN apt-get update -yy && \
apt-get install -yy curl ca-certificates bzip2 ceph-common && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
ARG TARGETPLATFORM
ARG TINI_VERSION=0.19.0
RUN if [ ${TARGETPLATFORM} = "linux/amd64" ]; then SUFFIX=amd64 ; HASH=93dcc18adc78c65a028a84799ecf8ad40c936fdfc5f2a57b1acda5a8117fa82c; \
elif [ ${TARGETPLATFORM} = "linux/arm64" ]; then SUFFIX=arm64 ; HASH=07952557df20bfd2a95f9bef198b445e006171969499a1d361bd9e6f8e5e0e81; \
else echo "no URL for ${TARGETPLATFORM}"; exit 1; fi && \
curl -Lo /tini https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-${SUFFIX} && \
printf "${HASH} /tini\\n" | sha256sum -c && \
chmod +x /tini
ARG RESTIC_VERSION=0.18.1
RUN if [ ${TARGETPLATFORM} = "linux/amd64" ]; then SUFFIX=linux_amd64; HASH=680838f19d67151adba227e1570cdd8af12c19cf1735783ed1ba928bc41f363d; \
elif [ ${TARGETPLATFORM} = "linux/arm64" ]; then SUFFIX=linux_arm64; HASH=87f53fddde38764095e9c058a3b31834052c37e5826d2acf34e18923c006bd45; \
elif [ ${TARGETPLATFORM} = "linux/riscv64" ]; then SUFFIX=linux_riscv64; HASH=0755894c17175802e6b84a3a19585a9c438d099305dbf215f018b00f25c9c097; \
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 > /usr/local/bin/restic && \
rm /tmp/restic.bz2 && \
chmod +x /usr/local/bin/restic
ARG QCOW2_WRITER_VERSION=0.1.0
ARG QCOW2_WRITER_DL_HASH=7c6ec8277e31498e5e73ca811c2b5feca7dce4d460b0fee695c4ba74ec63ecde
RUN curl -Lo /tmp/streaming-qcow2-writer_linux_amd64.bz2 https://github.com/NYU-ITS/streaming-qcow2-writer/releases/download/v${QCOW2_WRITER_VERSION}/streaming-qcow2-writer_${QCOW2_WRITER_VERSION}_linux_amd64.bz2 && \
printf "${QCOW2_WRITER_DL_HASH} /tmp/streaming-qcow2-writer_linux_amd64.bz2\\n" | sha256sum -c && \
bunzip2 < /tmp/streaming-qcow2-writer_linux_amd64.bz2 > /usr/local/bin/streaming-qcow2-writer && \
rm /tmp/streaming-qcow2-writer_linux_amd64.bz2 && \
chmod +x /usr/local/bin/streaming-qcow2-writer
ENTRYPOINT ["/tini", "--"]