diff --git a/.github/workflows/docker-image-debug.yml b/.github/workflows/docker-image-debug.yml index 864986b..8528170 100644 --- a/.github/workflows/docker-image-debug.yml +++ b/.github/workflows/docker-image-debug.yml @@ -43,4 +43,6 @@ jobs: linux/arm64/v8 push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha, scope=${{ github.workflow }} + cache-to: type=gha, scope=${{ github.workflow }} \ No newline at end of file diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 2747b11..46c2a91 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -45,6 +45,8 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha, scope=${{ github.workflow }} + cache-to: type=gha, scope=${{ github.workflow }} - name: Update DockerHub description uses: peter-evans/dockerhub-description@v3 diff --git a/Dockerfile b/Dockerfile index d72a9de..6f2a8bf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,29 @@ -FROM python:3.11.6-alpine3.18 AS base +FROM python:3.11.6-alpine3.19 WORKDIR /app -ENV BILI_IN_DOCKER=true +ENV LANG=zh_CN.UTF-8 \ + TZ=Asia/Shanghai \ + BILI_IN_DOCKER=true COPY poetry.lock pyproject.toml ./ -RUN apk add ffmpeg \ +RUN apk add --no-cache ffmpeg tini \ && apk add --no-cache --virtual .build-deps \ - gcc \ - musl-dev \ - libffi-dev \ - openssl-dev \ + gcc \ + musl-dev \ + libffi-dev \ + openssl-dev \ && pip install poetry \ && poetry config virtualenvs.create false \ && poetry install --no-dev --no-interaction --no-ansi \ - && apk del .build-deps + && apk del .build-deps \ + && rm -rf \ + /root/.cache \ + /tmp/* COPY . . -ENTRYPOINT [ "python", "entry.py" ] \ No newline at end of file +ENTRYPOINT [ "tini", "python", "entry.py" ] + +VOLUME [ "/app/config", "/app/data", "/app/thumb", "/Videos/Bilibilis" ] \ No newline at end of file diff --git a/README.md b/README.md index e6b0108..1d450e8 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,9 @@ ## 工作截图 -![下载视频](asset/run.png) +![下载视频](https://raw.githubusercontent.com/amtoaer/bili-sync/main/asset/run.png) -![EMBY 识别](asset/emby.png) +![EMBY 识别](https://raw.githubusercontent.com/amtoaer/bili-sync/main/asset/emby.png) ## 配置文件