borg/Dockerfile

21 lines
663 B
Docker
Raw Normal View History

2023-06-10 17:03:27 +00:00
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" ]