docker sculated time

This commit is contained in:
Parsa Nazer
2025-02-24 23:35:42 +03:30
parent 464cb1f550
commit 6c68d3f4b8
4 changed files with 22 additions and 5 deletions
+13 -3
View File
@@ -1,6 +1,16 @@
FROM alpine:3.19
RUN apk add --no-cache postgresql-client curl zip tzdata
RUN apk add --no-cache postgresql-client curl zip tzdata cron
RUN ln -sf /usr/share/zoneinfo/UTC /etc/localtime
RUN mkdir -p /var/log/cron
WORKDIR /app
COPY backup.sh .
RUN chmod +x backup.sh
CMD ["/app/backup.sh"]
COPY crontab /etc/crontabs/root
RUN chmod +x backup.sh && \
chmod 0644 /etc/crontabs/root && \
touch /var/log/cron/cron.log
CMD ["sh", "-c", "crond -l 8 -L /var/log/cron/cron.log -f"]