mirror of
https://github.com/yavook/kiwi-backup.git
synced 2024-11-24 07:53:01 +00:00
bunch of renamings
This commit is contained in:
parent
5a4a6e56b0
commit
8e149bea06
2 changed files with 22 additions and 15 deletions
35
Dockerfile
35
Dockerfile
|
@ -4,9 +4,6 @@ LABEL maintainer="jmm@yavook.de"
|
|||
COPY requirements.txt /tmp/
|
||||
|
||||
RUN set -ex; \
|
||||
\
|
||||
# create backup source
|
||||
mkdir -p /backup/source; \
|
||||
\
|
||||
# duplicity software dependencies
|
||||
apk --no-cache add \
|
||||
|
@ -59,22 +56,29 @@ RUN set -ex; \
|
|||
; \
|
||||
apk del --purge .build-deps; \
|
||||
rm -f "/tmp/requirements.txt"; \
|
||||
rm -rf "${HOME}/.cargo"; \
|
||||
\
|
||||
# create a non-root user
|
||||
adduser -D -u 1368 duplicity;
|
||||
|
||||
USER duplicity
|
||||
rm -rf "${HOME}/.cargo";
|
||||
|
||||
RUN set -ex; \
|
||||
\
|
||||
# confirm duplicity is working
|
||||
duplicity --version; \
|
||||
# create /kiwi-backup directories tree
|
||||
mkdir -m 777 /kiwi-backup; \
|
||||
mkdir -m 777 /kiwi-backup/source; \
|
||||
mkdir -m 777 /kiwi-backup/target; \
|
||||
\
|
||||
# create a non-root user
|
||||
adduser -D -u 1368 kiwi-backup;
|
||||
|
||||
USER kiwi-backup
|
||||
|
||||
RUN set -ex; \
|
||||
\
|
||||
mkdir -p "${HOME}/.cache/duplicity"; \
|
||||
mkdir -pm 600 "${HOME}/.gnupg";
|
||||
mkdir -pm 700 "${HOME}/.gnupg"; \
|
||||
\
|
||||
# confirm duplicity is working
|
||||
duplicity --version;
|
||||
|
||||
VOLUME [ "/home/duplicity/.cache/duplicity" ]
|
||||
VOLUME [ "/home/kiwi-backup/.cache/duplicity" ]
|
||||
|
||||
ENV \
|
||||
#################
|
||||
|
@ -92,7 +96,8 @@ ENV \
|
|||
SCHEDULE_RMFULL="36 05 * * SAT" \
|
||||
SCHEDULE_RMINCR="36 05 * * SUN" \
|
||||
BACKUP_VOLSIZE=1024 \
|
||||
BACKUP_TARGET="file:///backup/target" \
|
||||
BACKUP_SOURCE="/kiwi-backup/source" \
|
||||
BACKUP_TARGET="file:///kiwi-backup/target" \
|
||||
OPTIONS_ALL="" \
|
||||
OPTIONS_BACKUP="" \
|
||||
OPTIONS_CLEANUP="" \
|
||||
|
@ -107,3 +112,5 @@ ENV \
|
|||
|
||||
COPY bin /usr/local/bin/
|
||||
COPY libexec /usr/local/libexec/
|
||||
|
||||
CMD [ "kiwi-backup" ]
|
||||
|
|
|
@ -56,7 +56,7 @@ case "${task}" in
|
|||
printf ' --volsize %s' "${BACKUP_VOLSIZE}"
|
||||
printf ' --full-if-older-than %s' "${FULL_BACKUP_FREQUENCY}"
|
||||
printf '%s' "$( add_space "${OPTIONS_BACKUP}" )"
|
||||
printf ' /backup/source'
|
||||
printf ' %s' "${BACKUP_SOURCE}"
|
||||
;;
|
||||
|
||||
cleanup)
|
||||
|
|
Loading…
Reference in a new issue