From b49e250488adb5fffe5d895c2a053d355df6fc5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B6=B5=E6=9B=A6?= Date: Wed, 30 Oct 2024 09:03:14 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=E4=BF=AE=E6=94=B9=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 11 ++--------- Dockerfile.base | 8 +++++++- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 40bedb8..d5a7d44 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM hanxi/xiaomusic:base AS builder +FROM python:3.10 AS builder ENV DEBIAN_FRONTEND=noninteractive RUN pip install -U pdm ENV PDM_CHECK_UPDATE=false @@ -9,16 +9,9 @@ COPY plugins/ ./plugins/ COPY xiaomusic.py . RUN pdm install --prod --no-editable -FROM python:3.10-slim - -RUN apt-get update && apt-get install -y \ - libtiff6 \ - libopenjp2-7 \ - libxcb1 \ - && rm -rf /var/lib/apt/lists/* +FROM hanxi/xiaomusic:base WORKDIR /app -COPY --from=builder /app/ffmpeg /app/ffmpeg COPY --from=builder /app/.venv /app/.venv COPY xiaomusic/ ./xiaomusic/ COPY plugins/ ./plugins/ diff --git a/Dockerfile.base b/Dockerfile.base index 485d2a0..d4ca494 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -1,6 +1,12 @@ -FROM python:3.10 +FROM python:3.10-slim ENV DEBIAN_FRONTEND=noninteractive WORKDIR /app COPY install_dependencies.sh . RUN bash install_dependencies.sh +RUN apt-get update && apt-get install -y \ + libtiff6 \ + libopenjp2-7 \ + libxcb1 \ + && rm -rf /var/lib/apt/lists/* +