Skip to content

Commit

Permalink
后端dockerfile正确设置时区 && 忽略后端server/uploads文件夹 (flipped-aurora#1803)
Browse files Browse the repository at this point in the history
* dockerfile后端设置时区

* gitignore忽略后端uploads文件夹
  • Loading branch information
xue-ding-e authored Jul 1, 2024
1 parent e386b28 commit a4f139f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ rm_file/
/server/server
/server/latest_log
/server/__debug_bin*
server/uploads/

*.iml
web/.pnpm-debug.log
Expand Down
5 changes: 4 additions & 1 deletion server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ RUN go env -w GO111MODULE=on \
FROM alpine:latest

LABEL MAINTAINER="SliverHorn@[email protected]"

# 设置时区
ENV TZ=Asia/Shanghai
RUN apk update && apk add --no-cache tzdata openntpd \
&& ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
WORKDIR /go/src/github.com/flipped-aurora/gin-vue-admin/server

COPY --from=0 /go/src/github.com/flipped-aurora/gin-vue-admin/server/server ./
Expand Down

0 comments on commit a4f139f

Please sign in to comment.