Initial restic docker setup

This commit is contained in:
Tobias Kaupat committed 2016-11-07 23:21:19 +01:00
1 parent 26a3f905ec
commit f181ceeca8
6 files changed
+77

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
FROM gliderlabs/alpine:3.3
MAINTAINER info@lobaro.com
RUN echo http://nl.alpinelinux.org/alpine/v3.4/community >> /etc/apk/repositories
RUN apk add --no-cache git go nfs-utils fuse
RUN git clone https://github.com/restic/restic \
&& cd restic \
&& go run build.go \
&& cp restic /usr/local/bin/
RUN apk del git go
RUN mkdir /mnt/restic
ENV RESTIC_REPOSITORY=/mnt/restic
ENV RESTIC_PASSWORD=""
ENV RESTIC_TAG=""
ENV NFS_TARGET=""
# By default backup every 6 hours
ENV BACKUP_CRON="* */6 * * *"
# /data is the dir where you have to put the data to be backed up
VOLUME /data
COPY backup.sh /bin/backup
RUN chmod +x /bin/backup
COPY entry.sh /entry.sh
RUN touch /var/log/cron.log
ENTRYPOINT ["/entry.sh"]