diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-04 01:32:40 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-04 01:32:40 +0100 |
| commit | 9281c7e48405e8db94194f33af9e3bce60840929 (patch) | |
| tree | 6658755f2c4844963cef5fccbd456a84760509c5 /Dockerfile | |
| parent | leaderboard: use competition ranks consistently (diff) | |
| download | senator-sperma-9281c7e48405e8db94194f33af9e3bce60840929.tar.gz senator-sperma-9281c7e48405e8db94194f33af9e3bce60840929.zip | |
docker: pin and verify a week-old yt-dlp release
Diffstat (limited to '')
| -rw-r--r-- | Dockerfile | 14 |
1 files changed, 10 insertions, 4 deletions
| @@ -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 |
| 65 | ADD 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. |
| 66 | RUN chmod 755 /usr/local/bin/yt-dlp | 66 | ARG YTDLP_VERSION=2026.10.26 |
| 67 | ADD https://github.com/yt-dlp/yt-dlp/releases/download/${YTDLP_VERSION}/yt-dlp /usr/local/bin/yt-dlp | ||
| 68 | ADD https://github.com/yt-dlp/yt-dlp/releases/download/${YTDLP_VERSION}/SHA2-256SUMS /tmp/yt-dlp-sums | ||
| 69 | RUN 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 | ||
| 68 | RUN useradd --create-home --uid 1000 --shell /usr/sbin/nologin bot \ | 74 | RUN 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 \ |
