From 32978e5a32dd52b2bb8760be041e746c0c87cfdf Mon Sep 17 00:00:00 2001 From: Rathorian Date: Thu, 28 Nov 2024 14:57:35 +0100 Subject: [PATCH 1/2] update(): ruTorrent + unrar --- Dockerfile | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 070f2c0..4bcb06a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM alpine:3.20 AS builder -ARG UNRAR_VER=7.0.9 +ARG UNRAR_VER=7.1.1 RUN apk --update --no-cache add \ autoconf \ @@ -28,7 +28,7 @@ LABEL description="rutorrent based on alpinelinux" \ ARG FILEBOT=false ARG FILEBOT_VER=5.1.6 -ARG RUTORRENT_VER=5.1-beta3 +ARG RUTORRENT_VER=5.1.0 ENV UID=991 \ GID=991 \ diff --git a/README.md b/README.md index 7e27b62..72c52b1 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ | -------- | ----------- | ---- | ------------- | | **FILEBOT** | Build with filebot | *optional* | false | **FILEBOT_VER** | Filebot version | *optional* | 5.1.6 -| **RUTORRENT_VER** | ruTorrent version | *optional* | 5.1-beta3 +| **RUTORRENT_VER** | ruTorrent version | *optional* | 5.1.0 ### build From 7af8da9e8427f9f28c5123917ddb296319592c07 Mon Sep 17 00:00:00 2001 From: Rathorian Date: Thu, 28 Nov 2024 15:04:16 +0100 Subject: [PATCH 2/2] Update Dockerfile --- Dockerfile | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4bcb06a..dc2124d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,19 @@ -FROM alpine:3.20 AS builder - +ARG MKTORRENT_VERSION=v1.1 ARG UNRAR_VER=7.1.1 +# Create src image to retreive source files +FROM alpine:3.20 AS src +RUN apk --update --no-cache add curl git tar tree xz +WORKDIR /src + +# Retreive source files for mktorrent +FROM src AS src-mktorrent +RUN git init . && git remote add origin "https://github.com/pobrn/mktorrent.git" +ARG MKTORRENT_VERSION +RUN git fetch origin "${MKTORRENT_VERSION}" && git checkout -q FETCH_HEAD + +FROM alpine:3.20 AS builder + RUN apk --update --no-cache add \ autoconf \ automake \ @@ -21,6 +33,16 @@ RUN apk --update --no-cache add \ && make -f makefile \ && install -Dm 755 unrar /usr/bin/unrar +# Build and install mktorrent with pthreads +WORKDIR /usr/local/src/mktorrent +COPY --from=src-mktorrent /src . +RUN echo "CC = gcc" >> Makefile +RUN echo "CFLAGS = -w -flto -O3" >> Makefile +RUN echo "USE_PTHREADS = 1" >> Makefile +RUN echo "USE_OPENSSL = 1" >> Makefile +RUN make -j$(nproc) +RUN make install -j$(nproc) + FROM alpine:3.20 LABEL description="rutorrent based on alpinelinux" \ @@ -59,7 +81,6 @@ RUN apk --update --no-cache add \ libzen \ libzen-dev \ mediainfo \ - mktorrent \ nginx \ openssl \ php82 \