2017-03-18 17:11:03 -07:00
|
|
|
FROM ubuntu:xenial
|
|
|
|
MAINTAINER ViViDboarder <vividboarder@gmail.com>
|
|
|
|
|
|
|
|
RUN apt-get update \
|
2017-11-15 14:13:04 -08:00
|
|
|
&& apt-get install -y --no-install-recommends \
|
2017-11-16 09:22:30 -08:00
|
|
|
software-properties-common python-software-properties \
|
2017-03-18 17:11:03 -07:00
|
|
|
&& add-apt-repository ppa:duplicity-team/ppa \
|
|
|
|
&& apt-get update \
|
2017-11-15 14:13:04 -08:00
|
|
|
&& apt-get install -y --no-install-recommends \
|
2018-01-29 12:29:33 -08:00
|
|
|
cron \
|
|
|
|
duplicity \
|
2017-11-16 09:22:30 -08:00
|
|
|
lftp \
|
|
|
|
ncftp \
|
2018-01-29 12:29:33 -08:00
|
|
|
openssh-client \
|
2017-11-16 09:22:30 -08:00
|
|
|
python-cloudfiles \
|
|
|
|
python-gdata \
|
|
|
|
python-oauthlib \
|
|
|
|
python-paramiko \
|
2018-01-29 12:29:33 -08:00
|
|
|
python-pexpect \
|
|
|
|
python-pip \
|
|
|
|
python-setuptools \
|
2017-11-16 09:22:30 -08:00
|
|
|
python-swiftclient \
|
|
|
|
python-urllib3 \
|
|
|
|
rsync \
|
|
|
|
tahoe-lafs \
|
2018-04-12 21:23:38 -07:00
|
|
|
&& pip install -U boto b2 \
|
2017-09-10 19:12:45 +10:00
|
|
|
&& apt-get autoremove -y python-pip \
|
|
|
|
&& apt-get clean \
|
2017-03-18 17:11:03 -07:00
|
|
|
&& rm -rf /var/apt/lists/*
|
|
|
|
|
2018-05-13 10:30:02 -07:00
|
|
|
VOLUME /root/.cache/duplicity
|
|
|
|
VOLUME /backups
|
|
|
|
VOLUME /var/lock/duplicity
|
2017-03-18 17:11:03 -07:00
|
|
|
|
|
|
|
ENV BACKUP_DEST="file:///backups"
|
|
|
|
ENV BACKUP_NAME="backup"
|
|
|
|
ENV PATH_TO_BACKUP="/data"
|
|
|
|
ENV PASSPHRASE="Correct.Horse.Battery.Staple"
|
2018-05-13 10:30:02 -07:00
|
|
|
ENV FLOCK_WAIT=60
|
2017-03-18 17:11:03 -07:00
|
|
|
|
|
|
|
# Cron schedules
|
|
|
|
ENV CRON_SCHEDULE=""
|
2017-07-30 12:18:12 -07:00
|
|
|
ENV FULL_CRON_SCHEDULE=""
|
2017-03-18 17:11:03 -07:00
|
|
|
ENV VERIFY_CRON_SCHEDULE=""
|
|
|
|
|
2018-09-27 17:32:55 -07:00
|
|
|
# Create script dirs
|
|
|
|
RUN mkdir -p /scripts/backup/before
|
|
|
|
RUN mkdir -p /scripts/backup/after
|
|
|
|
RUN mkdir -p /scripts/restore/before
|
|
|
|
RUN mkdir -p /scripts/restore/after
|
|
|
|
|
2019-02-01 13:48:00 -08:00
|
|
|
COPY backup.sh /
|
|
|
|
COPY restore.sh /
|
|
|
|
COPY start.sh /
|
|
|
|
COPY verify.sh /
|
|
|
|
COPY healthcheck.sh /
|
|
|
|
COPY cron-exec.sh /
|
|
|
|
|
|
|
|
HEALTHCHECK CMD /healthcheck.sh
|
2017-03-18 17:11:03 -07:00
|
|
|
|
2018-05-20 20:34:48 -07:00
|
|
|
CMD [ "/start.sh" ]
|