17 lines
467 B
Bash
17 lines
467 B
Bash
#!/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 "$@"
|