init commit

This commit is contained in:
mk
2025-07-27 18:55:43 -03:00
commit 33f16af889
6 changed files with 192 additions and 0 deletions

25
Dockerfile Normal file
View File

@@ -0,0 +1,25 @@
FROM alpine:latest
# Install dependencies
RUN apk update && apk add --no-cache \
bash \
rsync \
coreutils \
cronie \
&& rm -rf /var/cache/apk/*
# Copy backup and list scripts
COPY backup.sh /usr/local/bin/backup.sh
COPY list.sh /usr/local/bin/list.sh
# Mark them executables
RUN chmod +x /usr/local/bin/backup.sh
RUN chmod +x /usr/local/bin/list.sh
# Add crontab file and needed cache directory
RUN mkdir -p /root/.cache/crontab && chmod 700 /root/.cache/crontab
COPY crontab.txt /etc/crontabs/root
RUN crontab /etc/crontabs/root
# Start cron in foreground
CMD ["/usr/sbin/crond", "-f"]