fix: include timezone data in runtime image

This commit is contained in:
Your Name
2026-10-13 00:57:51 +08:00
parent 99c55f1145
commit 35b6a37dad
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -21,6 +21,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o /out/im_workbench ./cmd/workbench
FROM alpine:3.22 FROM alpine:3.22
WORKDIR /app WORKDIR /app
RUN apk add --no-cache tzdata
ENV WORKBENCH_CONFIG=/app/configs/workbench.test.json ENV WORKBENCH_CONFIG=/app/configs/workbench.test.json
COPY --from=builder /out/im_workbench /app/im_workbench COPY --from=builder /out/im_workbench /app/im_workbench
COPY configs /app/configs COPY configs /app/configs
+5
View File
@@ -23,6 +23,11 @@ class DeploymentContractTest(unittest.TestCase):
self.assertIn("COPY --from=web-builder /web/dist /app/web/dist", dockerfile) self.assertIn("COPY --from=web-builder /web/dist /app/web/dist", dockerfile)
self.assertIn("EXPOSE 6061", 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): def test_docker_context_excludes_local_artifacts(self):
entries = { entries = {
line.strip() line.strip()