Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions .github/workflows/external_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ jobs:
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
echo "> External trigger running off of master branch. To disable this trigger, add \`deluge_master\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:'"deluge"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://')
echo "Type is \`alpine_repo\`" >> $GITHUB_STEP_SUMMARY
EXT_RELEASE=$(curl -sL "https://pypi.python.org/pypi/deluge/json" |jq -r '. | .info.version')
echo "Type is \`pip_version\`" >> $GITHUB_STEP_SUMMARY
if grep -q "^deluge_master_${EXT_RELEASE}" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` matches current external release; skipping trigger." >> $GITHUB_STEP_SUMMARY
Expand Down Expand Up @@ -107,13 +106,6 @@ jobs:
if [ "${EXT_RELEASE_SANITIZED}" == "${IMAGE_VERSION}" ]; then
echo "Sanitized version \`${EXT_RELEASE_SANITIZED}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
exit 0
elif [[ $(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/aarch64/APKINDEX.tar.gz" | tar -xz -C /tmp && awk '/^P:'"deluge"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://') != "${EXT_RELEASE}" ]]; then
echo "New version \`${EXT_RELEASE}\` found; but not all arch repos updated yet; exiting" >> $GITHUB_STEP_SUMMARY
FAILURE_REASON="New version ${EXT_RELEASE} for deluge tag latest is detected, however not all arch repos are updated yet. Will try again later."
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}],
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
exit 0
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-deluge/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
echo "New version \`${EXT_RELEASE}\` found; but there already seems to be an active build on Jenkins; exiting" >> $GITHUB_STEP_SUMMARY
exit 0
Expand Down
35 changes: 24 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

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

FROM ghcr.io/linuxserver/baseimage-alpine:edge
FROM ghcr.io/by275/libtorrent:2-alpine3.23 AS libtorrent

FROM ghcr.io/linuxserver/baseimage-alpine:3.23

# set version label
ARG BUILD_DATE
Expand All @@ -19,19 +21,26 @@ ENV PYTHON_EGG_CACHE="/config/plugins/.python-eggs" \
RUN \
echo "**** install build packages ****" && \
apk add --no-cache --upgrade --virtual=build-dependencies \
build-base && \
build-base \
python3-dev && \
echo "**** install packages ****" && \
if [ -z ${DELUGE_VERSION+x} ]; then \
DELUGE_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:deluge$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
fi && \
apk add --no-cache --upgrade --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
deluge==${DELUGE_VERSION} \
apk add --no-cache --upgrade \
boost1.84-python3 \
geoip \
python3 \
py3-future \
py3-geoip \
py3-requests \
p7zip && \
if [ -z ${DELUGE_VERSION+x} ]; then \
DELUGE_VERSION=$(curl -sL https://pypi.python.org/pypi/deluge/json |jq -r '. | .info.version');\
fi && \
python3 -m venv /lsiopy && \
pip install -U --no-cache-dir \
pip \
'setuptools==81' && \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.23/ \
rencode==1.0.6 && \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.23/ \
deluge[all]==${DELUGE_VERSION} \
pygeoip && \
echo "**** grab GeoIP database ****" && \
curl -L --retry 10 --retry-max-time 60 --retry-all-errors \
"https://geoip.linuxserver.io/GeoIP.dat.gz" \
Expand All @@ -44,6 +53,10 @@ RUN \
$HOME/.cache \
/tmp/*

COPY --from=libtorrent /libtorrent-build/usr/lib/libtorrent-rasterbar.* /usr/lib/

COPY --from=libtorrent /libtorrent-build/usr/lib/python3.12 /lsiopy/lib/python3.12

# add local files
COPY root/ /

Expand Down
35 changes: 24 additions & 11 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

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

FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-edge
FROM ghcr.io/by275/libtorrent:2-alpine3.23-arm64 AS libtorrent

FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.23

# set version label
ARG BUILD_DATE
Expand All @@ -19,19 +21,26 @@ ENV PYTHON_EGG_CACHE="/config/plugins/.python-eggs" \
RUN \
echo "**** install build packages ****" && \
apk add --no-cache --upgrade --virtual=build-dependencies \
build-base && \
build-base \
python3-dev && \
echo "**** install packages ****" && \
if [ -z ${DELUGE_VERSION+x} ]; then \
DELUGE_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:deluge$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
fi && \
apk add --no-cache --upgrade --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
deluge==${DELUGE_VERSION} \
apk add --no-cache --upgrade \
boost1.84-python3 \
geoip \
python3 \
py3-future \
py3-geoip \
py3-requests \
p7zip && \
if [ -z ${DELUGE_VERSION+x} ]; then \
DELUGE_VERSION=$(curl -sL https://pypi.python.org/pypi/deluge/json |jq -r '. | .info.version');\
fi && \
python3 -m venv /lsiopy && \
pip install -U --no-cache-dir \
pip \
'setuptools==81' && \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.23/ \
rencode==1.0.6 && \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.23/ \
deluge[all]==${DELUGE_VERSION} \
pygeoip && \
echo "**** grab GeoIP database ****" && \
curl -L --retry 10 --retry-max-time 60 --retry-all-errors \
"https://geoip.linuxserver.io/GeoIP.dat.gz" \
Expand All @@ -44,6 +53,10 @@ RUN \
$HOME/.cache \
/tmp/*

COPY --from=libtorrent /libtorrent-build/usr/lib/libtorrent-rasterbar.* /usr/lib/

COPY --from=libtorrent /libtorrent-build/usr/lib/python3.12 /lsiopy/lib/python3.12

# add local files
COPY root/ /

Expand Down
18 changes: 7 additions & 11 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,14 @@ pipeline {
QUAYIO_API_TOKEN=credentials('quayio-repo-api-token')
GIT_SIGNING_KEY=credentials('484fbca6-9a4f-455e-b9e3-97ac98785f5f')
BUILD_VERSION_ARG = 'DELUGE_VERSION'
EXT_PIP='deluge'
LS_USER = 'linuxserver'
LS_REPO = 'docker-deluge'
CONTAINER_NAME = 'deluge'
DOCKERHUB_IMAGE = 'linuxserver/deluge'
DEV_DOCKERHUB_IMAGE = 'lsiodev/deluge'
PR_DOCKERHUB_IMAGE = 'lspipepr/deluge'
DIST_IMAGE = 'alpine'
DIST_TAG = 'edge'
DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/edge/community/'
DIST_REPO_PACKAGES = 'deluge'
MULTIARCH='true'
CI='true'
CI_WEB='true'
Expand Down Expand Up @@ -145,19 +143,17 @@ pipeline {
/* ########################
External Release Tagging
######################## */
// If this is an alpine repo change for external version determine an md5 from the version string
stage("Set tag Alpine Repo"){
// If this is a pip release set the external tag to the pip version
stage("Set ENV pip_version"){
steps{
script{
env.EXT_RELEASE = sh(
script: '''curl -sL "${DIST_REPO}x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:'"${DIST_REPO_PACKAGES}"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://' ''',
script: '''curl -sL https://pypi.python.org/pypi/${EXT_PIP}/json |jq -r '. | .info.version' ''',
returnStdout: true).trim()
env.RELEASE_LINK = 'alpine_repo'
env.RELEASE_LINK = 'https://pypi.python.org/pypi/' + env.EXT_PIP
}
}
}
// Sanitize the release tag and strip illegal docker or github characters
} // Sanitize the release tag and strip illegal docker or github characters
stage("Sanitize tag"){
steps{
script{
Expand Down Expand Up @@ -1024,7 +1020,7 @@ pipeline {
"type": "commit",\
"tagger": {"name": "LinuxServer-CI","email": "[email protected]","date": "'${GITHUB_DATE}'"}}'
echo "Pushing New release for Tag"
echo "Updating external repo packages to ${EXT_RELEASE_CLEAN}" > releasebody.json
echo "Updating PIP version of ${EXT_PIP} to ${EXT_RELEASE_CLEAN}" > releasebody.json
jq -n \
--arg tag_name "$META_TAG" \
--arg target_commitish "master" \
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **02.04.26:** - Install from pypi due to Alpine geoip package deprecation.
* **29.12.25:** - Fix some issues with GeoIP updates.
* **23.08.25:** - Update GeoIP provider, add weekly cronjob to update.
* **12.01.25:** - Rebase libtorrentv1 branch to Alpine 3.21.
Expand Down
6 changes: 2 additions & 4 deletions jenkins-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,20 @@

# jenkins variables
project_name: docker-deluge
external_type: alpine_repo
external_type: pip_version
release_type: stable
release_tag: latest
ls_branch: master
repo_vars:
- BUILD_VERSION_ARG = 'DELUGE_VERSION'
- EXT_PIP='deluge'
- LS_USER = 'linuxserver'
- LS_REPO = 'docker-deluge'
- CONTAINER_NAME = 'deluge'
- DOCKERHUB_IMAGE = 'linuxserver/deluge'
- DEV_DOCKERHUB_IMAGE = 'lsiodev/deluge'
- PR_DOCKERHUB_IMAGE = 'lspipepr/deluge'
- DIST_IMAGE = 'alpine'
- DIST_TAG = 'edge'
- DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/edge/community/'
- DIST_REPO_PACKAGES = 'deluge'
- MULTIARCH='true'
- CI='true'
- CI_WEB='true'
Expand Down
1 change: 1 addition & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ init_diagram: |
"deluge:latest" <- Base Images
# changelog
changelogs:
- {date: "02.04.26:", desc: "Install from pypi due to Alpine geoip package deprecation."}
- {date: "29.12.25:", desc: "Fix some issues with GeoIP updates."}
- {date: "23.08.25:", desc: "Update GeoIP provider, add weekly cronjob to update."}
- {date: "12.01.25:", desc: "Rebase libtorrentv1 branch to Alpine 3.21."}
Expand Down
4 changes: 2 additions & 2 deletions root/etc/s6-overlay/s6-rc.d/svc-deluge-web/run
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ fi
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 ${DELUGE_WEB_PORT:-8112}" \
s6-setuidgid abc /usr/bin/deluge-web -d -c /config --loglevel="${DELUGE_LOGLEVEL}"
s6-setuidgid abc /lsiopy/bin/deluge-web -d -c /config --loglevel="${DELUGE_LOGLEVEL}"
else
exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 ${DELUGE_WEB_PORT:-8112}" \
/usr/bin/deluge-web -d -c /config --loglevel="${DELUGE_LOGLEVEL}"
/lsiopy/bin/deluge-web -d -c /config --loglevel="${DELUGE_LOGLEVEL}"
fi
4 changes: 2 additions & 2 deletions root/etc/s6-overlay/s6-rc.d/svc-deluged/run
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ fi
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 ${DELUGED_PORT:-58846}" \
s6-setuidgid abc /usr/bin/deluged -c /config -d --loglevel="${DELUGE_LOGLEVEL}"
s6-setuidgid abc /lsiopy/bin/deluged -c /config -d --loglevel="${DELUGE_LOGLEVEL}"
else
exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 ${DELUGED_PORT:-58846}" \
/usr/bin/deluged -c /config -d --loglevel="${DELUGE_LOGLEVEL}"
/lsiopy/bin/deluged -c /config -d --loglevel="${DELUGE_LOGLEVEL}"
fi