From 34474e861635ce47c051a646e290c25e7918eaed Mon Sep 17 00:00:00 2001 From: Dave Rolle Date: Sat, 25 Jul 2026 21:06:55 +0200 Subject: [PATCH] Provision curl_cffi so yt-dlp's Reddit workaround runs as designed yt-dlp's merged fix for Reddit's anonymous-API removal bootstraps its session with browser impersonation, which silently degrades without curl_cffi installed (yt-dlp/yt-dlp#16877): scrapes then fail with 429s whenever Reddit's rolling enforcement tightens. Both images now install it and strip the build-only pip afterward. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01DL3md3a3RoeRNStaDv1PDf --- Dockerfile.dev | 6 ++++-- Dockerfile.prod | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile.dev b/Dockerfile.dev index e3d83e3..a152c6f 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -2,14 +2,16 @@ FROM oven/bun # Install yt-dlp dependencies RUN apt-get update && \ - apt-get install -y python3 ffmpeg curl && \ + apt-get install -y python3 python3-pip ffmpeg curl && \ + # no venv: yt-dlp runs on the system python, so its deps must live there + pip install --no-cache-dir --break-system-packages curl-cffi && \ # Install yt-dlp in its own world-writable dir so it can self-update at # runtime (the container runs as a non-root user) mkdir /opt/yt-dlp && \ curl -L https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/latest/download/yt-dlp -o /opt/yt-dlp/yt-dlp && \ chmod -R 777 /opt/yt-dlp && \ # Clean up unnecessary files - apt-get remove -y curl && \ + apt-get remove -y curl python3-pip && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* diff --git a/Dockerfile.prod b/Dockerfile.prod index b105f04..3f4113b 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -2,14 +2,16 @@ FROM oven/bun:slim # Install yt-dlp dependencies RUN apt-get update && \ - apt-get install -y python3 ffmpeg curl && \ + apt-get install -y python3 python3-pip ffmpeg curl && \ + # no venv: yt-dlp runs on the system python, so its deps must live there + pip install --no-cache-dir --break-system-packages curl-cffi && \ # Install yt-dlp in its own world-writable dir so it can self-update at # runtime (the container runs as a non-root user) mkdir /opt/yt-dlp && \ curl -L https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/latest/download/yt-dlp -o /opt/yt-dlp/yt-dlp && \ chmod -R 777 /opt/yt-dlp && \ # Clean up unnecessary files - apt-get remove -y curl && \ + apt-get remove -y curl python3-pip && \ apt-get clean && \ rm -rf /var/lib/apt/lists/*