bollwerk/backup/Dockerfile
Jens Reinemann db2fc5dea1 fix: busybox crond statt dcron, pg17-Tokens aus Checksum filtern (#87)
- Dockerfile: dcron -> busybox crond (kein setpgid-Fehler im Container)
  Crontab in /var/spool/cron/crontabs/root
- backup.sh: grep-Filter fuer PostgreSQL 17 Security-Tokens
  (\restrict / \unrestrict) die sich bei jedem Dump aendern
2026-05-17 11:14:47 +02:00

17 lines
603 B
Docker

FROM alpine:3.21
# Install PostgreSQL client (busybox crond is included with Alpine)
RUN apk add --no-cache postgresql-client
COPY backup.sh /usr/local/bin/backup.sh
RUN chmod +x /usr/local/bin/backup.sh
# Crontab: run backup daily at 03:00 UTC
# busybox crond reads from /var/spool/cron/crontabs/<user>
RUN mkdir -p /var/spool/cron/crontabs \
&& echo "0 3 * * * /usr/local/bin/backup.sh >> /var/log/backup.log 2>&1" \
> /var/spool/cron/crontabs/root \
&& chmod 600 /var/spool/cron/crontabs/root
# busybox crond: -f = foreground, -d 8 = log level debug
CMD ["crond", "-f", "-d", "8"]