Files
harmony/examples/harmony_tenant_backup/Dockerfile

23 lines
1.2 KiB
Docker

# Build first: cargo build --release -p harmony-tenant-backup
# Build context = target/release (COPY paths), e.g.
# docker build -f examples/harmony_tenant_backup/Dockerfile target/release
FROM docker.io/library/debian:13-slim
# The real pin is this image's digest (setup refuses tags). These two have
# upstream release cycles outside apt's: the forum bug was rclone 1.60->1.71.
ARG RESTIC_VERSION=0.18.1
ARG RCLONE_VERSION=v1.71.0
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates curl unzip bzip2 postgresql-client tini \
&& curl -fsSL "https://github.com/restic/restic/releases/download/v${RESTIC_VERSION}/restic_${RESTIC_VERSION}_linux_amd64.bz2" \
| bunzip2 > /usr/local/bin/restic && chmod +x /usr/local/bin/restic \
&& curl -fsSL "https://downloads.rclone.org/${RCLONE_VERSION}/rclone-${RCLONE_VERSION}-linux-amd64.zip" -o /tmp/r.zip \
&& unzip -j /tmp/r.zip '*/rclone' -d /usr/local/bin && chmod +x /usr/local/bin/rclone && rm /tmp/r.zip \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
COPY harmony-tenant-backup /usr/local/bin/harmony-tenant-backup
USER 65534:65534
ENTRYPOINT ["/usr/bin/tini","--","/usr/local/bin/harmony-tenant-backup"]