Migrate distroless rTorrent runtime to openSUSE Tumbleweed
Build and Push Docker Image / build (push) Successful in 1m23s

This commit is contained in:
Ketan Patel committed 2026-11-01 21:45:11 -05:00
1 parent 18c861f52c
commit 5295c67f77
4 files changed
+84 -25

No files matched your search

+22 -5
View File
@@ -1,7 +1,13 @@
# docker-rtorrent
This is plain simple rtorrent with proxy and custom rtorrent.rc
Base image: Alpine Linux 3.24 stable (`alpine:3.24`), including its latest patch updates.
Build image: official openSUSE Tumbleweed (`opensuse/tumbleweed:latest`).
The final runtime is `scratch`, containing only rTorrent and its runtime dependencies.
Both rTorrent and libtorrent come from Tumbleweed's official RPM repository;
rTorrent itself is not compiled from source. The build requires matching versions
at least 0.16.27 and records the installed package versions in the build log.
This replaces Alpine's 0.16.12 packages, which predate upstream's callback
deadlock prevention changes in 0.16.13.
Source: https://git.k2patel.in/k2patel/docker-rtorrent
@@ -27,13 +33,17 @@ are uploaded to Gitea, and no local container builds are required.
## Distroless runtime
`docker.io/k2patel/rtorrent:latest` is the only maintained image variant.
The default Dockerfile exports the Alpine 3.24 rTorrent binary, musl libraries,
CA certificates and timezone/terminal data into a `scratch` image. It contains
The default Dockerfile exports Tumbleweed's rTorrent binary, matching libtorrent,
glibc loader and libraries, CA certificates and timezone/terminal data into a
`scratch` image. Native helpers are compiled against the same Tumbleweed libraries.
The exporter resolves transitive ELF dependencies, preserves symlink targets,
and includes DNS/files NSS modules when supplied by glibc. It contains
no shell, package manager, BusyBox, or build tools. The native launcher removes
the stale session lock and execs rTorrent; it also supplies the TCP health check.
CI starts rTorrent, runs the native public-IP helper through a scheduled
`execute.capture` hook, and verifies the resulting address over SCGI before
publication.
publication. The smoke check also verifies name lookup, certificate availability,
and an SCGI request that half-closes its sending side, as Flood does.
Use the default Compose file with the existing `.env` and mounted data:
@@ -56,6 +66,13 @@ SCGI port 5001, download paths and the session volume remain supported.
Mounted `rtorrent.rc` execute hooks must use programs available in the image;
shell commands and arbitrary external utilities are unavailable.
Tumbleweed is a rolling distribution: rebuilding installs its current packaged
pair, so test the mounted configuration before replacing an existing deployment.
Recent rTorrent releases remove legacy command aliases; update old configuration
commands to their full names. In particular, use `schedule` instead of `schedule2`
for the public-IP hook below. Existing configuration and torrent/session data
remain bind-mounted and are not rewritten by the image build.
## Public-IP reporting without a shell
@@ -70,7 +87,7 @@ host file mounted at `/root/.rtorrent.rc` with the following (adjust the proxy):
```ini
method.insert = get_public_ip_address, simple|private, "execute.capture=/usr/local/bin/rtorrent-public-ip,https://ipv4.icanhazip.com,http://10.10.12.60:8118"
schedule2 = ip_tick, 0, 1800, "network.local_address.set=(get_public_ip_address)"
schedule = ip_tick, 0, 1800, "network.local_address.set=(get_public_ip_address)"
```
Remove or leave commented the old bash-based definition; do not define both.