borg/Dockerfile

21 lines
663 B
Docker

FROM debian:latest
ENV COMMAND="/usr/bin/backup backup"
COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/
RUN apt-get update && apt-get install -yq python3 python3-pip trickle wget cron openssh-client info redis-tools mariadb-client postgresql-client iputils-ping borgbackup
RUN wget https://github.com/borgbackup/borg/releases/download/1.2.3/borg-linuxnew64 -O /usr/local/bin/borg &&\
chown root:root /usr/local/bin/borg && \
chmod 755 /usr/local/bin/borg
RUN mkdir /root/.ssh && ln -s /run/secrets/ssh_key /root/.ssh/id_rsa
COPY entry.sh /entry.sh
COPY backup.sh /usr/bin/backup
VOLUME [ "/src", "/dest" ]
ENTRYPOINT [ "/entry.sh" ]