diff --git a/Dockerfile b/Dockerfile index d379a81..eaca278 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,8 @@ COPY . /src RUN cd /src/BililiveRecorder.Cli && dotnet build -o /output -c Release FROM mcr.microsoft.com/dotnet/runtime:5.0-alpine +RUN apk add --no-cache tzdata +ENV TZ=Asia/Shanghai COPY --from=0 /output /app VOLUME [ "/rec" ] WORKDIR /app diff --git a/Dockerfile.GitHubActions b/Dockerfile.GitHubActions index a02b2c1..d23c703 100644 --- a/Dockerfile.GitHubActions +++ b/Dockerfile.GitHubActions @@ -1,4 +1,6 @@ FROM mcr.microsoft.com/dotnet/runtime:5.0 +ENV TZ=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone COPY ./BililiveRecorder.Cli/bin/docker_out /app VOLUME [ "/rec" ] WORKDIR /app