add crontab file
This commit is contained in:
parent
52a9d68e6b
commit
20b9100624
14
dockerfile
14
dockerfile
@ -1,4 +1,10 @@
|
|||||||
FROM mysql:latest
|
FROM mysql:8-debian
|
||||||
COPY backup.sh /usr/local/bin/
|
RUN apt-get update --allow-unauthenticated --allow-insecure-repositories
|
||||||
RUN chmod +x /usr/loca/bin/backup.sh
|
RUN apt-get -y install -qq --force-yes cron
|
||||||
CMD ["cron","-f"]
|
RUN echo "Log Start" >> /var/log/cron.log
|
||||||
|
RUN mkdir /backup
|
||||||
|
ADD backup.sh /usr/local/bin/
|
||||||
|
ADD mysqlCron /etc/cron.d/mysqlCron
|
||||||
|
RUN chmod 0644 /etc/cron.d/mysqlCron
|
||||||
|
RUN chmod 0744 /usr/local/bin/backup.sh
|
||||||
|
CMD cron && tail -f /var/log/cron.log
|
||||||
Loading…
x
Reference in New Issue
Block a user