From 8a6ec672c4e1de4a69b54c00ba3352e5431a046a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B6=B5=E6=9B=A6?= Date: Mon, 12 Jan 2026 18:44:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E4=BF=AE=E5=A4=8D=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E5=8D=A1=E4=BD=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 12 ++++-------- Dockerfile.builder | 16 +++++++++------- Dockerfile.runtime | 18 ++++++------------ 3 files changed, 19 insertions(+), 27 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2645942..ae3bd87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,11 @@ FROM hanxi/xiaomusic:builder AS builder -RUN pip install -U pdm -ENV PDM_CHECK_UPDATE=false WORKDIR /app -COPY pyproject.toml README.md package.json . +COPY pyproject.toml README.md package.json ./ -RUN pdm install --prod --no-editable -v -RUN node -v && npm -v -RUN uname -m -RUN npm config list -RUN npm install --verbose +RUN pip install -U pdm && \ + pdm install --prod --no-editable -v && \ + npm install --loglevel=verbose COPY xiaomusic/ ./xiaomusic/ COPY plugins/ ./plugins/ diff --git a/Dockerfile.builder b/Dockerfile.builder index d054ad6..ed98f1c 100644 --- a/Dockerfile.builder +++ b/Dockerfile.builder @@ -1,7 +1,12 @@ -FROM python:3.12-alpine3.22 +FROM python:3.12-slim-bookworm -RUN apk add --no-cache --virtual .build-deps build-base python3-dev libffi-dev openssl-dev zlib-dev jpeg-dev libc6-compat gcc musl-dev \ - && apk add --no-cache nodejs npm +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential \ + curl \ + && curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \ + && apt-get install -y nodejs \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* RUN pip install -U pdm ENV PDM_CHECK_UPDATE=false @@ -9,10 +14,7 @@ WORKDIR /app COPY pyproject.toml README.md package.json ./ RUN pdm install --prod --no-editable -v -RUN node -v && npm -v -RUN uname -m -RUN npm config list -RUN npm install --verbose +RUN npm install --loglevel=verbose COPY xiaomusic/ ./xiaomusic/ COPY plugins/ ./plugins/ diff --git a/Dockerfile.runtime b/Dockerfile.runtime index 5b3114f..4bd045b 100644 --- a/Dockerfile.runtime +++ b/Dockerfile.runtime @@ -1,19 +1,13 @@ -FROM python:3.12-alpine3.22 +FROM python:3.12-slim-bookworm -RUN apk add --no-cache bash\ - wget \ - xz \ - tiff \ - openjpeg \ - libxcb \ +RUN apt-get update && apt-get install -y --no-install-recommends \ supervisor \ - vim \ - libc6-compat \ ffmpeg \ - nodejs \ - npm \ + curl \ + && curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \ + && apt-get install -y nodejs \ + && apt-get clean \ && rm -rf /var/lib/apt/lists/* - WORKDIR /app RUN mkdir -p /app/ffmpeg/bin \ && ln -s /usr/bin/ffmpeg /app/ffmpeg/bin/ffmpeg \