From fe1028a2059a7ffdfb8b63877ab98a3329e1ac2c Mon Sep 17 00:00:00 2001 From: Manuel Date: Thu, 8 Nov 2018 14:46:39 +0100 Subject: [PATCH] Using dockerize as entry point --- Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 678e58e..a631b70 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,13 +3,18 @@ LABEL maintainer "Fco. Javier Delgado del Hoyo " COPY ["run.sh", "backup.sh", "restore.sh", "/"] -RUN apk add --update bash mysql-client gzip && rm -rf /var/cache/apk/* && mkdir /backup &&\ +RUN apk add --update bash mysql-client gzip openssl && rm -rf /var/cache/apk/* && mkdir /backup &&\ chmod u+x /backup.sh /restore.sh +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 \ + && tar -C /usr/local/bin -xzvf dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ + && rm dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz + ENV CRON_TIME="0 3 * * sun" \ MYSQL_HOST="mysql" \ MYSQL_PORT="3306" VOLUME ["/backup"] -CMD ["/run.sh"] +CMD dockerize -wait tcp://${MYSQL_HOST}:3306 /run.sh