Browse Source

dockerfile: edit timezone for Shanghai

Yi 1 year ago
parent
commit
61376e4300
1 changed files with 4 additions and 3 deletions
  1. 4 3
      Dockerfile

+ 4 - 3
Dockerfile

@@ -22,9 +22,10 @@ owner="yiping.xu"
 
 WORKDIR /app/kpt-tmr
 
-RUN rm -f /etc/localtime \
-&& ln -sv /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
-&& echo "Asia/Shanghai" > /etc/timezone
+RUN apk add --no-cache tzdata \
+&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
+&& echo "Asia/Shanghai" > /etc/timezone \
+&& apk del tzdata
 
 COPY --from=0 /app/kpt-tmr/conf/ /app/kpt-tmr/bin/conf/
 COPY --from=0  /app/kpt-tmr/bin/kptTmr /app/kpt-tmr/bin/kptTmr