-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.armhf
44 lines (34 loc) · 1.7 KB
/
Dockerfile.armhf
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
40
41
42
43
44
FROM alpine:latest
ARG ARCH=arm
ARG RCLONE_ARCH=arm-v7
ARG RCLONE_VERSION=1.65.0
ARG RESTIC_VERSION=0.16.2
ARG OVERLAY_VERSION=v2.2.0.3
ARG OVERLAY_ARCH=arm
ENV TZ Europe/Brussels
WORKDIR /restic
# install restic, rclone, tzdata, python3 and apprise
ARG RESTIC_URL=https://github.com/restic/restic/releases/download/v${RESTIC_VERSION}/restic_${RESTIC_VERSION}_linux_${ARCH}.bz2
ARG RCLONE_URL=https://github.com/rclone/rclone/releases/download/v${RCLONE_VERSION}/rclone-v${RCLONE_VERSION}-linux-${RCLONE_ARCH}.zip
# from https://github.com/jasonccox/restic-rclone-docker
RUN wget -O - $RESTIC_URL | bzip2 -d -c > /bin/restic && \
wget -O rclone.zip $RCLONE_URL && \
unzip rclone.zip && \
mv rclone-*/rclone /bin/rclone && \
chmod +x /bin/restic /bin/rclone && \
rm -rf rclone.zip rclone-* && \
apk add --no-cache --upgrade tzdata tini python3 py3-pip git logrotate shadow bash wget && \
pip install -U --no-cache-dir pip apprise --break-system-packages && \
apk --purge del git
COPY /root /
RUN chmod +x /usr/local/bin/start.sh && \
chmod +x /usr/local/bin/restic.sh && \
cp /opt/rclone /etc/logrotate.d/rclone && \
cp /opt/restic /etc/logrotate.d/restic
# add s6 overlay from https://github.com/linuxserver/docker-baseimage-alpine
ADD https://github.com/just-containers/s6-overlay/releases/download/${OVERLAY_VERSION}/s6-overlay-${OVERLAY_ARCH}-installer /tmp/
RUN chmod +x /tmp/s6-overlay-${OVERLAY_ARCH}-installer && /tmp/s6-overlay-${OVERLAY_ARCH}-installer / && rm /tmp/s6-overlay-${OVERLAY_ARCH}-installer
RUN addgroup -S restic && adduser -S restic -G restic
VOLUME [ "/config", "/data", "/logs" ]
CMD ["/sbin/tini", "-v", "--", "/usr/local/bin/start.sh"]
ENTRYPOINT ["/init"]