-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Dockerfile
30 lines (25 loc) · 880 Bytes
/
Dockerfile
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
FROM alpine:3.12.0
ARG RSNAPSHOT_VERSION=latest
# install rsnapshot
COPY configuration/rsnapshot.conf.default /etc/rsnapshot.conf
COPY imagescripts /usr/bin/rsnapshot.d
RUN apk upgrade --update && \
if [ "${RSNAPSHOT_VERSION}" = "latest" ]; \
then apk add rsnapshot ; \
else apk add "rsnapshot=${RSNAPSHOT_VERSION}" ; \
fi && \
mkdir -p /usr/bin/rsnapshot.d && \
cp /etc/rsnapshot.conf /usr/bin/rsnapshot.d/rsnapshot.conf && \
chmod ug+x /usr/bin/rsnapshot.d/*.sh && \
rm -rf /var/cache/apk/* && rm -rf /tmp/*
ENV BACKUP_INTERVAL= \
BACKUP_DIRECTORIES= \
DELAYED_START= \
RSNAPSHOT_HOURLY_TIMES= \
RSNAPSHOT_DAILY_TIMES= \
RSNAPSHOT_WEEKLY_TIMES= \
RSNAPSHOT_MONTHLY_TIMES= \
VOLUME_DIRECTORY=/snapshots
ENTRYPOINT ["/usr/bin/rsnapshot.d/docker-entrypoint.sh"]
VOLUME ["${VOLUME_DIRECTORY}"]
CMD ["rsnapshot"]