docker sculated time
This commit is contained in:
+13
-3
@@ -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"]
|
||||
Reference in New Issue
Block a user