the image agrees with itself about the timezone (V-545)
compose set TZ=Europe/Samara and Go read it, so clock replies and quiet hours were already local. But /etc/localtime in the image pointed at Etc/UTC, so a caller asking the system zone instead of the environment answered UTC. The reminder path shells out to python dateparser, which is such a caller. TZ is now a build arg on the runtime stage. It points the symlink, writes /etc/timezone and sets ENV TZ, so the image is local on its own. Compose passes the zone it already declares, so the zone stays written in one place.
This commit is contained in:
+6
-1
@@ -12,7 +12,12 @@ x-image: &image
|
||||
# build on EVERY service (same image name ⇒ built once) so `docker compose
|
||||
# build <anyservice>` actually rebuilds. With build on only one service, the
|
||||
# others silently no-op and you deploy a stale binary.
|
||||
build: .
|
||||
build:
|
||||
context: .
|
||||
# the zone is declared once, here. The image points /etc/localtime at it so
|
||||
# a caller reading the system zone agrees with one reading TZ (V-545).
|
||||
args:
|
||||
TZ: Europe/Samara
|
||||
pull_policy: never # only ever the locally-built image
|
||||
restart: unless-stopped
|
||||
# local time for clock/date replies AND quiet-hours evaluation. Change to
|
||||
|
||||
Reference in New Issue
Block a user