Skip to content
Snippets Groups Projects
Verified Commit d8afd6e6 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

feat: use jesec rtorrent instead

parent c4887921
No related branches found
No related tags found
No related merge requests found
Pipeline #2901 passed
FROM alpine:3.15 AS builder
ARG RTORRENT_VERSION=0.9.8
ARG LIBTORRENT_VERSION=0.13.8
RUN apk add --no-cache \
alpine-sdk \
autoconf \
automake \
curl-dev \
libsigc++-dev \
libtool \
linux-headers \
ncurses-dev \
openssl-dev \
xmlrpc-c-dev \
zlib-dev
RUN git clone --branch v${RTORRENT_VERSION} --single-branch https://github.com/rakshasa/rtorrent.git /rtorrent
RUN git clone --branch v${LIBTORRENT_VERSION} --single-branch https://github.com/rakshasa/libtorrent.git /libtorrent
WORKDIR /libtorrent
RUN ./autogen.sh && \
./configure \
--prefix=/usr \
--disable-debug \
--disable-instrumentation && \
make -j$(nproc) && \
mkdir -p /build && \
DESTDIR=/build make install && \
make install
WORKDIR /rtorrent
RUN ./autogen.sh && \
./configure \
--prefix=/usr \
--disable-debug \
--with-xmlrpc-c && \
make -j$(nproc) && \
mkdir -p /build && \
DESTDIR=/build make install
FROM alpine:3.15
RUN apk add --no-cache \
......@@ -48,13 +8,13 @@ RUN apk add --no-cache \
ncurses-libs \
xmlrpc-c
COPY --from=builder /build/usr/bin/rtorrent /usr/bin/rtorrent
COPY --from=builder /build/usr/lib/libtorrent.so* /usr/lib/
RUN curl -L https://github.com/jesec/rtorrent/releases/latest/download/rtorrent-linux-amd64 > /usr/bin/rtorrent && \
chmod +x /usr/bin/rtorrent
RUN adduser -u 1000 -D rtorrent && \
addgroup rtorrent rtorrent && \
mkdir -p /data && chown rtorrent /data && \
mkdir -p /private && chown rtorrent /private
mkdir -p /session && chown rtorrent /session
USER rtorrent
......
......@@ -6,6 +6,7 @@ rm /session/rtorrent.lock /session/rtorrent.pid || true
if [ -n "$EXTERNAL_IP_CMD" ]; then
EXTERNAL_IP=$(eval "$EXTERNAL_IP_CMD")
echo "external ip: ${EXTERNAL_IP}"
fi
if [ -n "$EXTERNAL_IP" ]; then
rtorrent -i "$EXTERNAL_IP" -n -o "import=/rtorrent.rc" &
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment