feat: Add timezone setting
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
|
||||
# Configure timezone inside the container if TZ is provided.
|
||||
# This avoids relying on host mounts like /etc/localtime, which are awkward on Windows.
|
||||
if [ "${TZ:-}" != "" ]; then
|
||||
ZONEINFO="/usr/share/zoneinfo/${TZ}"
|
||||
if [ -e "$ZONEINFO" ]; then
|
||||
ln -snf "$ZONEINFO" /etc/localtime
|
||||
echo "$TZ" > /etc/timezone
|
||||
else
|
||||
echo "[entrypoint] Warning: TZ='$TZ' not found at $ZONEINFO; keeping existing timezone." >&2
|
||||
fi
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user