From 7eab4bc508def6814697b8cde06273bdf0cf64ba Mon Sep 17 00:00:00 2001 From: CI Bot Date: Thu, 13 Aug 2026 21:25:30 +0800 Subject: [PATCH] fix: add ffmpeg to API runtime image for cover fallback PR #1360 introduced FFmpeg-based frame extraction as fallback for cover generation, but the API Docker image did not include FFmpeg binary. Worker image already has it via worker-base-runtime, but API image only had libpq5 in its runtime stage. This caused subprocess calls to fail with FileNotFoundError when the cover generation tried to use _extract_frames_with_ffmpeg fallback. Fix: add ffmpeg to apt-get install in runtime stage of api.Dockerfile. --- infra/docker/api.Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/infra/docker/api.Dockerfile b/infra/docker/api.Dockerfile index bf3b58a66..d38681050 100755 --- a/infra/docker/api.Dockerfile +++ b/infra/docker/api.Dockerfile @@ -53,9 +53,10 @@ ARG APP_VERSION=dev RUN sed -i 's|deb.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources 2>/dev/null || \ sed -i 's|deb.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list 2>/dev/null || true -# 只装运行时需要的库(libpq5 是 psycopg2 运行时依赖) +# 只装运行时需要的库(libpq5 是 psycopg2 运行时依赖,ffmpeg 用于封面兜底取帧) RUN apt-get update && apt-get install -y --no-install-recommends \ libpq5 \ + ffmpeg \ && rm -rf /var/lib/apt/lists/* # 从 builder 复制虚拟环境 -- 2.54.0