From 2b1d2e979aeb919d1f8b98ffef490dc9f35d2f75 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 12 Feb 2018 15:43:58 +0100 Subject: [PATCH] Reorder Dockerfile for less layers --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index a8c0300..678e58e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,15 @@ FROM alpine:3.7 LABEL maintainer "Fco. Javier Delgado del Hoyo " -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" \ MYSQL_HOST="mysql" \ MYSQL_PORT="3306" -COPY ["run.sh", "backup.sh", "restore.sh", "/"] -RUN chmod u+x /backup.sh /restore.sh - VOLUME ["/backup"] CMD ["/run.sh"]