From ceaff37f4c00c90fdce0ec0fa104c03abb55b1cb Mon Sep 17 00:00:00 2001 From: ky0utarou <168627817+ky0utarou@users.noreply.github.com> Date: Wed, 1 May 2024 19:38:20 +0800 Subject: [PATCH 1/2] Dockerfile - keep tzdata for correct time --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b314c0a..bd8fec7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,8 +11,7 @@ RUN apk update && apk add --no-cache \ tzdata \ ffmpeg \ && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ - && echo "Asia/Shanghai" > /etc/timezone \ - && apk del tzdata + && echo "Asia/Shanghai" > /etc/timezone RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ mv ./targets/Linux-x86_64-bili-sync-rs ./bili-sync-rs; \ From 622c967fa41943c9b9e32010b639f9195b1c10bb Mon Sep 17 00:00:00 2001 From: ky0utarou <168627817+ky0utarou@users.noreply.github.com> Date: Wed, 1 May 2024 21:13:11 +0800 Subject: [PATCH 2/2] Dockerfile - install tzdata only for correct logging time refer to https://stackoverflow.com/a/68996528 --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index bd8fec7..c66dd8e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,9 +9,7 @@ COPY ./*-bili-sync-rs ./targets/ RUN apk update && apk add --no-cache \ ca-certificates \ tzdata \ - ffmpeg \ - && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ - && echo "Asia/Shanghai" > /etc/timezone + ffmpeg RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ mv ./targets/Linux-x86_64-bili-sync-rs ./bili-sync-rs; \