mirror of
https://github.com/amtoaer/bili-sync.git
synced 2026-05-07 08:02:46 +08:00
chore: Optimization docker (#17)
* feat: docker build adds cache * fix: dockerfile optimization * doc: dockerhub pictures are not displayed properly --------- Co-authored-by: DDSRem <1448139087@qq.com>
This commit is contained in:
4
.github/workflows/docker-image-debug.yml
vendored
4
.github/workflows/docker-image-debug.yml
vendored
@@ -43,4 +43,6 @@ jobs:
|
||||
linux/arm64/v8
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha, scope=${{ github.workflow }}
|
||||
cache-to: type=gha, scope=${{ github.workflow }}
|
||||
2
.github/workflows/docker-image.yml
vendored
2
.github/workflows/docker-image.yml
vendored
@@ -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
|
||||
|
||||
25
Dockerfile
25
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" ]
|
||||
ENTRYPOINT [ "tini", "python", "entry.py" ]
|
||||
|
||||
VOLUME [ "/app/config", "/app/data", "/app/thumb", "/Videos/Bilibilis" ]
|
||||
Reference in New Issue
Block a user