mirror of
https://github.com/fradelg/docker-mysql-cron-backup.git
synced 2025-01-18 16:22:33 +01:00
Reorder Dockerfile for less layers
This commit is contained in:
parent
e98c5cdf2c
commit
2b1d2e979a
1 changed files with 4 additions and 4 deletions
|
@ -1,15 +1,15 @@
|
||||||
FROM alpine:3.7
|
FROM alpine:3.7
|
||||||
LABEL maintainer "Fco. Javier Delgado del Hoyo <frandelhoyo@gmail.com>"
|
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
|
COPY ["run.sh", "backup.sh", "restore.sh", "/"]
|
||||||
|
|
||||||
|
RUN apk add --update bash mysql-client gzip && rm -rf /var/cache/apk/* && mkdir /backup &&\
|
||||||
|
chmod u+x /backup.sh /restore.sh
|
||||||
|
|
||||||
ENV CRON_TIME="0 3 * * sun" \
|
ENV CRON_TIME="0 3 * * sun" \
|
||||||
MYSQL_HOST="mysql" \
|
MYSQL_HOST="mysql" \
|
||||||
MYSQL_PORT="3306"
|
MYSQL_PORT="3306"
|
||||||
|
|
||||||
COPY ["run.sh", "backup.sh", "restore.sh", "/"]
|
|
||||||
RUN chmod u+x /backup.sh /restore.sh
|
|
||||||
|
|
||||||
VOLUME ["/backup"]
|
VOLUME ["/backup"]
|
||||||
|
|
||||||
CMD ["/run.sh"]
|
CMD ["/run.sh"]
|
||||||
|
|
Loading…
Reference in a new issue