mirror of
https://github.com/lobaro/restic-backup-docker.git
synced 2026-11-22 01:02:39 +00:00
Initial restic docker setup
This commit is contained in:
1 parent
26a3f905ec
commit
f181ceeca8
6 files changed
+77
No files matched your search
+31
@@ -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"]
|
||||
|
||||
Reference in new issue
Block a user