时区更新

This commit is contained in:
wuchao 2024-06-27 15:37:54 +08:00
parent ebf862c8d9
commit cf002110d4
1 changed files with 2 additions and 4 deletions

View File

@ -22,11 +22,9 @@
#RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o server main.go #RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o server main.go
# 创建最终镜像用于运行编译后的Go程序 # 创建最终镜像用于运行编译后的Go程序
FROM golang:1.21.0 FROM alpine
#设置时区 #设置时区
# 复制宿主机的时区文件到容器内 ENV TimeZone=Asia/Shanghai
COPY /etc/timezone /etc/timezone
COPY /etc/localtime /etc/localtime
WORKDIR /app WORKDIR /app
# 将编译好的二进制文件从构建阶段复制到运行阶段 # 将编译好的二进制文件从构建阶段复制到运行阶段