From 8622152cebfcfd753eaa7f6616f311e15ed7a66d Mon Sep 17 00:00:00 2001 From: "javier.legido" Date: Sat, 3 Oct 2020 11:29:37 +0200 Subject: [PATCH 1/2] Install alpine package 'tzdata' to allow passing timezone as environment variable: '-e TZ=foo/bar' --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 60306ea..b431222 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.12 LABEL maintainer "Fco. Javier Delgado del Hoyo " -RUN apk add --update bash mysql-client gzip openssl && rm -rf /var/cache/apk/* +RUN apk add --update tzdata bash mysql-client gzip openssl && rm -rf /var/cache/apk/* ARG OS=alpine-linux ARG ARCH=amd64 From 748381cdd26434bfae3c889c08d2a78548001299 Mon Sep 17 00:00:00 2001 From: "javier.legido" Date: Sat, 3 Oct 2020 11:35:01 +0200 Subject: [PATCH 2/2] Clarify that environment variable 'CRON_TIME' uses UTC timezone --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f44fe2c..7da931f 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ docker container run -d \ - `MYSQL_PASS`: The password of your mysql database. - `MYSQL_DB`: The database name to dump. Default: `--all-databases`. - `MYSQLDUMP_OPTS`: Command line arguments to pass to mysqldump. Example: `--single-transaction`. -- `CRON_TIME`: The interval of cron job to run mysqldump. `0 3 * * sun` by default, which is every Sunday at 03:00. +- `CRON_TIME`: The interval of cron job to run mysqldump. `0 3 * * sun` by default, which is every Sunday at 03:00. It uses UTC timezone. - `MAX_BACKUPS`: The number of backups to keep. When reaching the limit, the old backup will be discarded. No limit by default. - `INIT_BACKUP`: If set, create a backup when the container starts. - `INIT_RESTORE_LATEST`: If set, restores latest backup.