Skip to content

Commit acb875e

Browse files
committed
Install from pypi to work around Alpine edge package deprecations?
1 parent 2439eee commit acb875e

4 files changed

Lines changed: 51 additions & 22 deletions

File tree

Dockerfile

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
FROM ghcr.io/linuxserver/unrar:latest AS unrar
44

5-
FROM ghcr.io/linuxserver/baseimage-alpine:edge
5+
FROM ghcr.io/by275/libtorrent:2-alpine3.23 AS libtorrent
6+
7+
FROM ghcr.io/linuxserver/baseimage-alpine:3.23
68

79
# set version label
810
ARG BUILD_DATE
@@ -19,19 +21,27 @@ ENV PYTHON_EGG_CACHE="/config/plugins/.python-eggs" \
1921
RUN \
2022
echo "**** install build packages ****" && \
2123
apk add --no-cache --upgrade --virtual=build-dependencies \
22-
build-base && \
24+
build-base \
25+
python3-dev && \
2326
echo "**** install packages ****" && \
24-
if [ -z ${DELUGE_VERSION+x} ]; then \
25-
DELUGE_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
26-
&& awk '/^P:deluge$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
27-
fi && \
28-
apk add --no-cache --upgrade --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
29-
deluge==${DELUGE_VERSION} \
27+
apk add --no-cache --upgrade \
28+
boost1.84-python3 \
29+
geoip \
3030
python3 \
31-
py3-future \
32-
py3-geoip \
33-
py3-requests \
3431
p7zip && \
32+
if [ -z ${DELUGE_VERSION+x} ]; then \
33+
DELUGE_VERSION=$(curl -sL https://pypi.python.org/pypi/deluge/json |jq -r '. | .info.version');\
34+
fi && \
35+
python3 -m venv /lsiopy && \
36+
pip install -U --no-cache-dir \
37+
pip \
38+
setuptools \
39+
wheel && \
40+
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.23/ \
41+
rencode==1.0.6 && \
42+
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.23/ \
43+
deluge[all]==${DELUGE_VERSION} \
44+
pygeoip && \
3545
echo "**** grab GeoIP database ****" && \
3646
curl -L --retry 10 --retry-max-time 60 --retry-all-errors \
3747
"https://geoip.linuxserver.io/GeoIP.dat.gz" \
@@ -44,6 +54,10 @@ RUN \
4454
$HOME/.cache \
4555
/tmp/*
4656

57+
COPY --from=libtorrent /libtorrent-build/usr/lib/libtorrent-rasterbar.* /usr/lib/
58+
59+
COPY --from=libtorrent /libtorrent-build/usr/lib/python3.12 /lsiopy/lib/python3.12
60+
4761
# add local files
4862
COPY root/ /
4963

Dockerfile.aarch64

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
FROM ghcr.io/linuxserver/unrar:arm64v8-latest AS unrar
44

5-
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-edge
5+
FROM ghcr.io/by275/libtorrent:2-alpine3.23-arm64 AS libtorrent
6+
7+
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.23
68

79
# set version label
810
ARG BUILD_DATE
@@ -19,19 +21,26 @@ ENV PYTHON_EGG_CACHE="/config/plugins/.python-eggs" \
1921
RUN \
2022
echo "**** install build packages ****" && \
2123
apk add --no-cache --upgrade --virtual=build-dependencies \
22-
build-base && \
24+
build-base \
25+
python3-dev && \
2326
echo "**** install packages ****" && \
24-
if [ -z ${DELUGE_VERSION+x} ]; then \
25-
DELUGE_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
26-
&& awk '/^P:deluge$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
27-
fi && \
28-
apk add --no-cache --upgrade --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
29-
deluge==${DELUGE_VERSION} \
27+
apk add --no-cache --upgrade \
28+
boost1.84-python3 \
29+
geoip \
3030
python3 \
31-
py3-future \
32-
py3-geoip \
33-
py3-requests \
3431
p7zip && \
32+
if [ -z ${DELUGE_VERSION+x} ]; then \
33+
DELUGE_VERSION=$(curl -sL https://pypi.python.org/pypi/deluge/json |jq -r '. | .info.version');\
34+
fi && \
35+
python3 -m venv /lsiopy && \
36+
pip install -U --no-cache-dir \
37+
pip \
38+
'setuptools==81' && \
39+
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.23/ \
40+
rencode==1.0.6 && \
41+
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.23/ \
42+
deluge[all]==${DELUGE_VERSION} \
43+
pygeoip && \
3544
echo "**** grab GeoIP database ****" && \
3645
curl -L --retry 10 --retry-max-time 60 --retry-all-errors \
3746
"https://geoip.linuxserver.io/GeoIP.dat.gz" \
@@ -44,6 +53,10 @@ RUN \
4453
$HOME/.cache \
4554
/tmp/*
4655

56+
COPY --from=libtorrent /libtorrent-build/usr/lib/libtorrent-rasterbar.* /usr/lib/
57+
58+
COPY --from=libtorrent /libtorrent-build/usr/lib/python3.12 /lsiopy/lib/python3.12
59+
4760
# add local files
4861
COPY root/ /
4962

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
323323

324324
## Versions
325325

326+
* **02.04.26:** - Install from pypi due to Alpine geoip package deprecation.
326327
* **29.12.25:** - Fix some issues with GeoIP updates.
327328
* **23.08.25:** - Update GeoIP provider, add weekly cronjob to update.
328329
* **12.01.25:** - Rebase libtorrentv1 branch to Alpine 3.21.

readme-vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ init_diagram: |
101101
"deluge:latest" <- Base Images
102102
# changelog
103103
changelogs:
104+
- {date: "02.04.26:", desc: "Install from pypi due to Alpine geoip package deprecation."}
104105
- {date: "29.12.25:", desc: "Fix some issues with GeoIP updates."}
105106
- {date: "23.08.25:", desc: "Update GeoIP provider, add weekly cronjob to update."}
106107
- {date: "12.01.25:", desc: "Rebase libtorrentv1 branch to Alpine 3.21."}

0 commit comments

Comments
 (0)