Skip to content

Commit

Permalink
设置为上海时间
Browse files Browse the repository at this point in the history
  • Loading branch information
王伟 authored and 王伟 committed Jul 18, 2023
1 parent f7e4a16 commit 0cf6697
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN go env -w GOPROXY=https://goproxy.io
RUN go env -w GOSUMDB=off

# 设置上海时区
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone
# 官方并没有提供预编译的包,需要自己编译,但是直接编译的话会提示报错,需要在先安装一下g++
RUN apk add --no-cache --virtual .build-deps \
ca-certificates \
gcc \
g++ \
git

# 设置上海时区
RUN apk add -U tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && apk del tzdata

# 设置工作目录
WORKDIR /app

Expand Down

0 comments on commit 0cf6697

Please sign in to comment.