Repository navigation
Commit 024c9e8
committed
fix(time): expand LOCAL_TIMEZONE in Docker ENTRYPOINT
Exec-form ENTRYPOINT does not invoke a shell, so
"${LOCAL_TIMEZONE}" was never expanded — it reached
mcp-server-time as the literal string "${LOCAL_TIMEZONE}"
on every run, regardless of what -e LOCAL_TIMEZONE was set to.
That string is truthy, so get_local_tz() always took the
override branch and called ZoneInfo("${LOCAL_TIMEZONE}"),
which raises ZoneInfoNotFoundError. The container exits 1
on startup every time, whether or not the caller sets the
variable — the feature added in #640 has never worked.
Verified against the published Dockerfile:
# before, docker run --rm -e LOCAL_TIMEZONE=Europe/Paris mcp/time
zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found
with key ${LOCAL_TIMEZONE}'
exit 1
# after, identical command
exit 0
Switched to shell-form ENTRYPOINT with `exec` so the variable
expands while mcp-server-time still replaces the shell as PID 1
(signals like SIGTERM still reach it directly, matching the
exec-form behavior everywhere else in this Dockerfile).
Signed-off-by: ks72 <[email protected]>1 parent 38569bd commit 024c9e8
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | | - | |
| 47 | + | |
0 commit comments