fix issue counting backups per DB

This commit is contained in:
Fco. Javier Delgado del Hoyo 2019-07-28 15:58:55 +02:00
parent b2a78edcdc
commit 7f01602f0f
4 changed files with 18 additions and 15 deletions

View file

@ -1,10 +1,7 @@
FROM alpine:3.7
LABEL maintainer "Fco. Javier Delgado del Hoyo <frandelhoyo@gmail.com>"
COPY ["run.sh", "backup.sh", "restore.sh", "/"]
RUN apk add --update bash mysql-client gzip openssl && rm -rf /var/cache/apk/* && mkdir /backup &&\
chmod u+x /backup.sh /restore.sh
RUN apk add --update bash mysql-client gzip openssl && rm -rf /var/cache/apk/*
ENV DOCKERIZE_VERSION v0.6.1
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
@ -16,6 +13,8 @@ ENV CRON_TIME="0 3 * * sun" \
MYSQL_PORT="3306" \
TIMEOUT="10s"
COPY ["run.sh", "backup.sh", "restore.sh", "/"]
RUN mkdir /backup && chmod u+x /backup.sh /restore.sh
VOLUME ["/backup"]
CMD dockerize -wait tcp://${MYSQL_HOST}:${MYSQL_PORT} -timeout ${TIMEOUT} /run.sh