Merge the timezone symlink fix (#172)
This commit is contained in:
+11
@@ -82,11 +82,22 @@ FROM debian:trixie-slim AS runtime
|
|||||||
# tzdata so the TZ env (set in compose) resolves — otherwise Go can't load the
|
# tzdata so the TZ env (set in compose) resolves — otherwise Go can't load the
|
||||||
# zone and time.Now() stays UTC, and mavend answers clock/date queries and
|
# zone and time.Now() stays UTC, and mavend answers clock/date queries and
|
||||||
# evaluates quiet-hours in UTC.
|
# evaluates quiet-hours in UTC.
|
||||||
|
#
|
||||||
|
# TZ is a build arg as well as an env because the image was self-inconsistent
|
||||||
|
# without it (V-545): compose set TZ=Europe/Samara and Go read it, but
|
||||||
|
# /etc/localtime still pointed at Etc/UTC, so anything asking the system zone
|
||||||
|
# instead of the environment answered UTC. The reminder path shells out to
|
||||||
|
# python dateparser, which is exactly such a caller. Compose passes the same
|
||||||
|
# zone it already declares, so the zone is written in one place.
|
||||||
|
ARG TZ=Etc/UTC
|
||||||
|
ENV TZ=$TZ
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
ca-certificates libvulkan1 mesa-vulkan-drivers libgomp1 tzdata \
|
ca-certificates libvulkan1 mesa-vulkan-drivers libgomp1 tzdata \
|
||||||
python3 python3-pip && \
|
python3 python3-pip && \
|
||||||
pip3 install --no-cache-dir --break-system-packages 'dateparser==1.4.1' && \
|
pip3 install --no-cache-dir --break-system-packages 'dateparser==1.4.1' && \
|
||||||
apt-get purge -y --auto-remove python3-pip && \
|
apt-get purge -y --auto-remove python3-pip && \
|
||||||
|
ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime && \
|
||||||
|
echo "$TZ" > /etc/timezone && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# runtime native libs: whisper/ggml (incl. vulkan) are real files in deps/lib.
|
# runtime native libs: whisper/ggml (incl. vulkan) are real files in deps/lib.
|
||||||
|
|||||||
+6
-1
@@ -12,7 +12,12 @@ x-image: &image
|
|||||||
# build on EVERY service (same image name ⇒ built once) so `docker compose
|
# build on EVERY service (same image name ⇒ built once) so `docker compose
|
||||||
# build <anyservice>` actually rebuilds. With build on only one service, the
|
# build <anyservice>` actually rebuilds. With build on only one service, the
|
||||||
# others silently no-op and you deploy a stale binary.
|
# 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
|
pull_policy: never # only ever the locally-built image
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
# local time for clock/date replies AND quiet-hours evaluation. Change to
|
# local time for clock/date replies AND quiet-hours evaluation. Change to
|
||||||
|
|||||||
Reference in New Issue
Block a user