From a9c6a14757c8df231357d7af2c13dd526f021660 Mon Sep 17 00:00:00 2001 From: Amir Zarrinkafsh Date: Fri, 7 Jun 2019 10:35:45 +1000 Subject: [PATCH 1/4] Add tzdata package to container Signed-off-by: Amir Zarrinkafsh --- docker/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index c35da67a2aad..85c8817ca6e0 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -64,6 +64,7 @@ RUN apk add --no-cache --virtual .runtime_deps \ libxslt \ libpq \ zlib \ + tzdata \ su-exec COPY --from=builder /install /usr/local From 62673146d28b50dd2ff5ff85808784bf1c270618 Mon Sep 17 00:00:00 2001 From: Amir Zarrinkafsh Date: Fri, 7 Jun 2019 10:40:40 +1000 Subject: [PATCH 2/4] Update Docker README.md to include instructions for specifying timezones Signed-off-by: Amir Zarrinkafsh --- docker/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/README.md b/docker/README.md index df5d0151e23b..96478f28c9c0 100644 --- a/docker/README.md +++ b/docker/README.md @@ -86,6 +86,7 @@ Global settings: * ``UID``, the user id Synapse will run as [default 991] * ``GID``, the group id Synapse will run as [default 991] +* ``TZ``, the [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) the container will run with [default UTC] * ``SYNAPSE_CONFIG_PATH``, path to a custom config file If ``SYNAPSE_CONFIG_PATH`` is set, you should generate a configuration file From ad5e3e5fc7af9ec8bc72ec8a6fbdf9a14e9a784b Mon Sep 17 00:00:00 2001 From: Amir Zarrinkafsh Date: Fri, 7 Jun 2019 10:52:52 +1000 Subject: [PATCH 3/4] Include changelog entry Signed-off-by: Amir Zarrinkafsh --- changelog.d/5383.feature | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5383.feature diff --git a/changelog.d/5383.feature b/changelog.d/5383.feature new file mode 100644 index 000000000000..5d084cf0b290 --- /dev/null +++ b/changelog.d/5383.feature @@ -0,0 +1 @@ +Add ability to change Docker containers [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) with the `TZ` variable. From 9129e3428f9a3b9a1dad57713644abc597e341b4 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Tue, 2 Jul 2019 10:29:40 +0100 Subject: [PATCH 4/4] docker/README: remove TZ from generate section --- docker/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker/README.md b/docker/README.md index ca8226175615..46bb9d2d998a 100644 --- a/docker/README.md +++ b/docker/README.md @@ -62,8 +62,6 @@ The following environment variables are supported in `generate` mode: such as the datatase and media store. Defaults to `/data`. * `UID`, `GID`: the user id and group id to use for creating the data directories. Defaults to `991`, `991`. -* `TZ`: the [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) the container will run with. Defaults to `UTC`. - ## Running synapse