docker-mysql-cron-backup/Dockerfile

16 lines
378 B
Text
Raw Normal View History

2018-01-30 08:32:45 +01:00
FROM alpine:3.7
2017-09-11 09:36:38 +02:00
LABEL maintainer "Fco. Javier Delgado del Hoyo <frandelhoyo@gmail.com>"
RUN apk add --update bash mysql-client gzip && rm -rf /var/cache/apk/* && mkdir /backup
ENV CRON_TIME="0 3 * * sun" \
MYSQL_HOST="mysql" \
MYSQL_PORT="3306"
2017-09-11 09:36:38 +02:00
COPY ["run.sh", "backup.sh", "restore.sh", "/"]
RUN chmod u+x /backup.sh /restore.sh
VOLUME ["/backup"]
CMD ["/run.sh"]