From 35b6a37dad7d9385f9dcedecdc5cba4ff554b5e1 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 13 Oct 2026 00:57:51 +0800 Subject: [PATCH] fix: include timezone data in runtime image --- Dockerfile | 1 + tests/test_deployment_contract.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index ab58438..5e5c299 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o /out/im_workbench ./cmd/workbench FROM alpine:3.22 WORKDIR /app +RUN apk add --no-cache tzdata ENV WORKBENCH_CONFIG=/app/configs/workbench.test.json COPY --from=builder /out/im_workbench /app/im_workbench COPY configs /app/configs diff --git a/tests/test_deployment_contract.py b/tests/test_deployment_contract.py index bfae227..c9acc88 100644 --- a/tests/test_deployment_contract.py +++ b/tests/test_deployment_contract.py @@ -23,6 +23,11 @@ class DeploymentContractTest(unittest.TestCase): self.assertIn("COPY --from=web-builder /web/dist /app/web/dist", dockerfile) self.assertIn("EXPOSE 6061", dockerfile) + def test_runtime_image_includes_timezone_database_for_mysql_dsn(self): + dockerfile = (ROOT / "Dockerfile").read_text() + + self.assertIn("RUN apk add --no-cache tzdata", dockerfile) + def test_docker_context_excludes_local_artifacts(self): entries = { line.strip()