mirror of
https://github.com/lobaro/restic-backup-docker.git
synced 2026-11-10 07:29:21 +00:00
Base image directly on official restic image
This has the advantage of using Alpine Linux as base and having certs, ssh and fuse already installed.
This commit is contained in:
1 parent
15012cdab1
commit
9469bbe7ba
1 file changed
+1
-13
+1
-13
@@ -1,26 +1,14 @@
|
|||||||
FROM alpine:3.10.1 as certs
|
|
||||||
RUN apk add --no-cache ca-certificates
|
|
||||||
|
|
||||||
# Get restic executable
|
|
||||||
ENV RESTIC_VERSION=0.9.5
|
|
||||||
ADD https://github.com/restic/restic/releases/download/v${RESTIC_VERSION}/restic_${RESTIC_VERSION}_linux_amd64.bz2 /
|
|
||||||
RUN bzip2 -d restic_${RESTIC_VERSION}_linux_amd64.bz2 && mv restic_${RESTIC_VERSION}_linux_amd64 /bin/restic && chmod +x /bin/restic
|
|
||||||
|
|
||||||
FROM alpine as rclone
|
FROM alpine as rclone
|
||||||
|
|
||||||
# Get rclone executable
|
# Get rclone executable
|
||||||
ADD https://downloads.rclone.org/rclone-current-linux-amd64.zip /
|
ADD https://downloads.rclone.org/rclone-current-linux-amd64.zip /
|
||||||
RUN unzip rclone-current-linux-amd64.zip && mv rclone-*-linux-amd64/rclone /bin/rclone && chmod +x /bin/rclone
|
RUN unzip rclone-current-linux-amd64.zip && mv rclone-*-linux-amd64/rclone /bin/rclone && chmod +x /bin/rclone
|
||||||
|
|
||||||
FROM busybox:glibc
|
FROM restic/restic:latest
|
||||||
|
|
||||||
# install mailx
|
# install mailx
|
||||||
RUN apk add --update --no-cache heirloom-mailx
|
RUN apk add --update --no-cache heirloom-mailx
|
||||||
|
|
||||||
COPY --from=certs /etc/ssl/certs /etc/ssl/certs
|
|
||||||
COPY --from=certs /bin/restic /bin/restic
|
|
||||||
COPY --from=rclone /bin/rclone /bin/rclone
|
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
mkdir -p /mnt/restic /var/spool/cron/crontabs /var/log; \
|
mkdir -p /mnt/restic /var/spool/cron/crontabs /var/log; \
|
||||||
touch /var/log/cron.log;
|
touch /var/log/cron.log;
|
||||||
|
|||||||
Reference in new issue
Block a user