ci: Dockerfile - 保留tzdata (#91)

* Dockerfile - keep tzdata for correct time

* Dockerfile - install tzdata only for correct logging time

refer to https://stackoverflow.com/a/68996528
This commit is contained in:
ky0utarou
2024-05-01 21:21:22 +08:00
committed by GitHub
parent e732e7d616
commit 10ccb47790
+1 -4
View File
@@ -9,10 +9,7 @@ COPY ./*-bili-sync-rs ./targets/
RUN apk update && apk add --no-cache \ RUN apk update && apk add --no-cache \
ca-certificates \ ca-certificates \
tzdata \ tzdata \
ffmpeg \ ffmpeg
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& apk del tzdata
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
mv ./targets/Linux-x86_64-bili-sync-rs ./bili-sync-rs; \ mv ./targets/Linux-x86_64-bili-sync-rs ./bili-sync-rs; \