support setting timezone in docker images (#2091)

This commit is contained in:
Bowen Liang
2024-01-19 20:30:36 +08:00
committed by GitHub
parent ec1659cba0
commit 9ad7b65996
2 changed files with 13 additions and 0 deletions

View File

@@ -2,6 +2,9 @@
FROM node:20.11.0-alpine AS base
LABEL maintainer="takatost@gmail.com"
RUN apk add --no-cache tzdata
# install packages
FROM base as packages
@@ -32,6 +35,10 @@ ENV CONSOLE_API_URL http://127.0.0.1:5001
ENV APP_API_URL http://127.0.0.1:5001
ENV PORT 3000
# set timezone
ENV TZ UTC
RUN ln -s /usr/share/zoneinfo/${TZ} /etc/localtime \
&& echo ${TZ} > /etc/timezone
WORKDIR /app/web
COPY --from=builder /app/web/public ./public