forked from lobaro/restic-backup-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
49 lines (41 loc) · 1.12 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
FROM restic/restic:0.17.3
RUN \
mkdir -p /mnt/restic /var/spool/cron/crontabs /var/log; \
touch /var/log/cron.log;
ENV RESTIC_REPOSITORY=/mnt/restic
ENV RESTIC_PASSWORD=""
ENV RESTIC_TAG=""
ENV NFS_TARGET=""
ENV BACKUP_CRON="0 */6 * * *"
ENV RESTIC_FORGET_ARGS=""
ENV RESTIC_JOB_ARGS=""
ENV MAILX_ARGS=""
ENV RESTIC_REPOSITORY=""
ENV RESTIC_PASSWORD=""
ENV OS_AUTH_URL=""
ENV OS_PROJECT_ID=""
ENV OS_PROJECT_NAME=""
ENV OS_USER_DOMAIN_NAME="Default"
ENV OS_PROJECT_DOMAIN_ID="default"
ENV OS_USERNAME=""
ENV OS_PASSWORD=""
ENV OS_REGION_NAME=""
ENV OS_INTERFACE=""
ENV OS_IDENTITY_API_VERSION=3
# openshift fix
RUN mkdir /.cache && \
chgrp -R 0 /.cache && \
chmod -R g=u /.cache && \
chgrp -R 0 /mnt && \
chmod -R g=u /mnt && \
chgrp -R 0 /var/spool/cron/crontabs/root && \
chmod -R g=u /var/spool/cron/crontabs/root && \
chgrp -R 0 /var/log/cron.log && \
chmod -R g=u /var/log/cron.log
# /data is the dir where you have to put the data to be backed up
VOLUME /data
COPY backup.sh /bin/backup
COPY entry.sh /entry.sh
WORKDIR "/"
ENTRYPOINT ["/entry.sh"]
CMD ["tail","-fn0","/var/log/cron.log"]