forked from jswetzen/docker-rsync-backup
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
59 lines (53 loc) · 1.54 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
FROM alpine:latest
#THX TO Johan Swetzén <[email protected]> for Build up the basic parts
MAINTAINER MrDoob <[email protected]>
ENV BACKUPDIR="/home" \
ARCHIVEROOT="/backup" \
EXCLUDES="/backup_excludes" \
SSH_PORT="22" \
SSH_IDENTITY_FILE="/root/.ssh/id_rsa" \
CRON_TIME="0 1 * * *" \
LOGS="/log" \
SET_CONTAINER_TIMEZONE="true" \
CONTAINER_TIMEZONE="Europe/Berlin" \
BACKUP_HOLD="15" \
SERVER_ID="docker" \
RSYNC_COMPRESS_LEVEL="2" \
DISCORD_WEBHOOK_URL="" \
DISCORD_ICON_OVERRIDE="https://i.imgur.com/KorF8zC.png" \
DISCORD_NAME_OVERRIDE="BACKUP"
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/community/ >> /etc/apk/repositories && \
apk update && apk upgrade && \
apk add --no-cache \
ca-certificates \
rsync \
openssh-client \
tar \
wget \
logrotate \
shadow \
bash \
bc \
findutils \
coreutils \
openssl \
curl \
libxml2-utils \
htop \
tree \
nano \
pigz \
mc \
tzdata \
openntpd \
grep
RUN wget https://downloads.rclone.org/rclone-current-linux-amd64.zip -O rclone.zip --no-check-certificate && \
unzip rclone.zip && rm rclone.zip && \
mv rclone*/rclone /usr/bin && rm -r rclone* && \
mkdir -p /rclone
COPY docker-entrypoint.sh /usr/local/bin/
COPY backup.sh /backup.sh
ADD backup_excludes /root/backup_excludes
RUN chmod +x /root/backup_excludes
ENTRYPOINT ["docker-entrypoint.sh"]
CMD /backup.sh && crond -f