fix: install yt-dlp via pip instead of prebuilt binary
All checks were successful
Build & Push Docker Image / build-and-push (push) Successful in 42s

The prebuilt yt-dlp binary is compiled against glibc and fails on
Alpine Linux (musl libc) with 'cannot execute'. Install python3 +
py3-pip and use pip to install yt-dlp instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Giancarmine Salucci
2026-05-06 19:17:18 +02:00
parent dc65c028c1
commit ed5e88f5ca

View File

@@ -22,10 +22,9 @@ FROM node:22-alpine AS runtime
WORKDIR /app WORKDIR /app
# Runtime tools + timezone data # Runtime tools + timezone data
RUN apk add --no-cache ffmpeg tzdata && \ # yt-dlp prebuilt binary requires glibc; Alpine uses musl → install via pip instead
wget -qO /usr/local/bin/yt-dlp \ RUN apk add --no-cache ffmpeg tzdata python3 py3-pip && \
https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp && \ pip3 install --no-cache-dir --break-system-packages yt-dlp
chmod +x /usr/local/bin/yt-dlp
# Copy built output and production node_modules # Copy built output and production node_modules
# node:22-alpine ships with user node (uid=1000, gid=1000) # node:22-alpine ships with user node (uid=1000, gid=1000)