aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-04 01:32:40 +0100
committersalmonik <salmonik@tuta.io>2026-11-04 01:32:40 +0100
commit9281c7e48405e8db94194f33af9e3bce60840929 (patch)
tree6658755f2c4844963cef5fccbd456a84760509c5
parentleaderboard: use competition ranks consistently (diff)
downloadsenator-sperma-9281c7e48405e8db94194f33af9e3bce60840929.tar.gz
senator-sperma-9281c7e48405e8db94194f33af9e3bce60840929.zip
docker: pin and verify a week-old yt-dlp release
-rw-r--r--Dockerfile14
-rw-r--r--README.md5
2 files changed, 13 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
index 9a79752..7987f85 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -60,10 +60,16 @@ RUN apt-get update \
60 tzdata \ 60 tzdata \
61 && rm -rf /var/lib/apt/lists/* 61 && rm -rf /var/lib/apt/lists/*
62 62
63# yt-dlp is distributed as a self-contained Python zipapp; using the latest 63# yt-dlp is distributed as a self-contained Python zipapp. Pin a release that
64# release avoids the stale Debian package breaking on YouTube changes. 64# is at least a week old (and verify its checksum) so a compromised or broken
65ADD https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp /usr/local/bin/yt-dlp 65# upstream release cannot silently enter the image.
66RUN chmod 755 /usr/local/bin/yt-dlp 66ARG YTDLP_VERSION=2026.10.26
67ADD https://github.com/yt-dlp/yt-dlp/releases/download/${YTDLP_VERSION}/yt-dlp /usr/local/bin/yt-dlp
68ADD https://github.com/yt-dlp/yt-dlp/releases/download/${YTDLP_VERSION}/SHA2-256SUMS /tmp/yt-dlp-sums
69RUN cd /usr/local/bin \
70 && grep ' yt-dlp$' /tmp/yt-dlp-sums | sha256sum -c - \
71 && chmod 755 yt-dlp \
72 && rm /tmp/yt-dlp-sums
67 73
68RUN useradd --create-home --uid 1000 --shell /usr/sbin/nologin bot \ 74RUN useradd --create-home --uid 1000 --shell /usr/sbin/nologin bot \
69 && mkdir -p /app/data /app/piper /tmp/senator_sperma \ 75 && mkdir -p /app/data /app/piper /tmp/senator_sperma \
diff --git a/README.md b/README.md
index de77d6a..a3da394 100644
--- a/README.md
+++ b/README.md
@@ -111,8 +111,9 @@ Notes:
111- If the build fails to resolve `crates.io` or `deb.debian.org`, run 111- If the build fails to resolve `crates.io` or `deb.debian.org`, run
112 `docker buildx build --load --network=host -t senator-sperma:latest .`; 112 `docker buildx build --load --network=host -t senator-sperma:latest .`;
113 `compose.yaml` already sets `network: host` for builds on this host. 113 `compose.yaml` already sets `network: host` for builds on this host.
114- yt-dlp is fetched from the latest upstream release at image build time. 114- yt-dlp is pinned to a specific upstream release and verified against the
115 Rebuild with `--no-cache` (`docker compose build --no-cache`) to refresh it. 115 release checksum at image build time. Bump `YTDLP_VERSION` in the Dockerfile
116 to update it; pick a release that is at least a week old.
116 117
117## Commands 118## Commands
118 119