From 05cf6a37737690fb1d7d30020e8e32958faee511 Mon Sep 17 00:00:00 2001 From: thespad Date: Tue, 19 Aug 2025 20:10:09 +0100 Subject: [PATCH] Add tzdata for localised timezone support --- Dockerfile | 3 ++- Dockerfile.aarch64 | 3 ++- Dockerfile.riscv64 | 3 ++- README.md | 4 ++++ readme-vars.yml | 4 ++++ 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index dd360f6..4668fe2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,8 @@ RUN \ echo "**** install build packages ****" && \ apk add --no-cache \ alpine-release \ - curl && \ + curl \ + tzdata && \ if [ -z ${HAPROXY_VERSION+x} ]; then \ HAPROXY_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.22/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ && awk '/^P:haproxy$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index dd360f6..4668fe2 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -14,7 +14,8 @@ RUN \ echo "**** install build packages ****" && \ apk add --no-cache \ alpine-release \ - curl && \ + curl \ + tzdata && \ if [ -z ${HAPROXY_VERSION+x} ]; then \ HAPROXY_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.22/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ && awk '/^P:haproxy$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \ diff --git a/Dockerfile.riscv64 b/Dockerfile.riscv64 index dd360f6..4668fe2 100644 --- a/Dockerfile.riscv64 +++ b/Dockerfile.riscv64 @@ -14,7 +14,8 @@ RUN \ echo "**** install build packages ****" && \ apk add --no-cache \ alpine-release \ - curl && \ + curl \ + tzdata && \ if [ -z ${HAPROXY_VERSION+x} ]; then \ HAPROXY_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.22/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ && awk '/^P:haproxy$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \ diff --git a/README.md b/README.md index ddc92b3..3bfa0c1 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,7 @@ services: - SWARM=0 #optional - SYSTEM=0 #optional - TASKS=0 #optional + - TZ=Etc/UTC #optional - VERSION=1 #optional - VOLUMES=0 #optional volumes: @@ -149,6 +150,7 @@ docker run -d \ -e SWARM=0 `#optional` \ -e SYSTEM=0 `#optional` \ -e TASKS=0 `#optional` \ + -e TZ=Etc/UTC `#optional` \ -e VERSION=1 `#optional` \ -e VOLUMES=0 `#optional` \ -v /var/run/docker.sock:/var/run/docker.sock:ro \ @@ -190,6 +192,7 @@ Containers are configured using parameters passed at runtime (such as those abov | `-e SWARM=0` | `/swarm` | | `-e SYSTEM=0` | `/system` | | `-e TASKS=0` | `/tasks` | +| `-e TZ=Etc/UTC` | `Set container timezone` | | `-e VERSION=1` | `/version` | | `-e VOLUMES=0` | `/volumes` | | `-v /var/run/docker.sock:ro` | Mount the host docker socket into the container. | @@ -316,6 +319,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **19.08.25:** - Add tzdata for localised logging timestamps. * **03.06.25:** - Rebase to Alpine 3.22. Add RISCV support. * **08.04.25:** - Add `LOG_LEVEL` back. * **06.04.25:** - Switch back to haproxy for better handling of `docker exec` connection hijacking. diff --git a/readme-vars.yml b/readme-vars.yml index 82284e4..018e813 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -115,6 +115,7 @@ full_custom_readme: | - SWARM=0 #optional - SYSTEM=0 #optional - TASKS=0 #optional + - TZ=Etc/UTC #optional - VERSION=1 #optional - VOLUMES=0 #optional volumes: @@ -156,6 +157,7 @@ full_custom_readme: | -e SWARM=0 `#optional` \ -e SYSTEM=0 `#optional` \ -e TASKS=0 `#optional` \ + -e TZ=Etc/UTC `#optional` \ -e VERSION=1 `#optional` \ -e VOLUMES=0 `#optional` \ -v /var/run/docker.sock:/var/run/docker.sock:ro \ @@ -197,6 +199,7 @@ full_custom_readme: | | `-e SWARM=0` | `/swarm` | | `-e SYSTEM=0` | `/system` | | `-e TASKS=0` | `/tasks` | + | `-e TZ=Etc/UTC` | `Set container timezone` | | `-e VERSION=1` | `/version` | | `-e VOLUMES=0` | `/volumes` | | `-v /var/run/docker.sock:ro` | Mount the host docker socket into the container. | @@ -323,6 +326,7 @@ full_custom_readme: | ## Versions + * **19.08.25:** - Add tzdata for localised logging timestamps. * **03.06.25:** - Rebase to Alpine 3.22. Add RISCV support. * **08.04.25:** - Add `LOG_LEVEL` back. * **06.04.25:** - Switch back to haproxy for better handling of `docker exec` connection hijacking.