fix: 添加 tzdata 和容器时区配置,修复 Alpine 镜像缺少时区数据的问题

This commit is contained in:
2026-06-26 15:55:10 +08:00
parent 7d717e30ce
commit 3234f7ab1f
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o server .
FROM alpine:latest
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
apk --no-cache add ca-certificates
apk --no-cache add ca-certificates tzdata
WORKDIR /app
COPY --from=builder /app/server .
+2
View File
@@ -4,4 +4,6 @@ services:
ports:
- "8083:8083"
env_file: .env
environment:
- TZ=Asia/Shanghai
restart: unless-stopped