Skip to content

Commit

Permalink
fix: set locale
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-ding committed Oct 10, 2024
1 parent 09862a2 commit b281c6f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ COPY --from=flutter /app/build/web ./ui/build/web/
RUN CGO_ENABLED=0 go build -o polaris -ldflags="-X polaris/db.Version=$(git describe --tags --long)" ./cmd/

FROM debian:stable-slim
ENV TZ="Asia/Shanghai" GIN_MODE=release PUID=0 PGID=0 UMASK=0 PERMS=true

WORKDIR /app
RUN apt-get update && apt-get -y install ca-certificates tzdata gosu tini && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \
&& echo "${TZ}" > /etc/timezone && apt-get clean
RUN apt-get update && apt-get -y install ca-certificates tzdata gosu tini locales && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \
&& echo "${TZ}" > /etc/timezone && apt-get clean && sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen

ENV TZ="Asia/Shanghai" GIN_MODE=release PUID=0 PGID=0 UMASK=0
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8

# 将上一个阶段publish文件夹下的所有文件复制进来
COPY --from=builder /app/polaris .
Expand Down

0 comments on commit b281c6f

Please sign in to comment.