Skip to content

Commit

Permalink
Merge pull request #211 from linuxserver/v1-3.21
Browse files Browse the repository at this point in the history
  • Loading branch information
thespad authored Jan 14, 2025
2 parents cbdecd4 + b0c1f43 commit b992f5e
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 29 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

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

FROM ghcr.io/by275/libtorrent:1-alpine3.20 AS libtorrent
FROM ghcr.io/by275/libtorrent:1-alpine3.21 AS libtorrent

FROM ghcr.io/linuxserver/baseimage-alpine:3.20
FROM ghcr.io/linuxserver/baseimage-alpine:3.21

# set version label
ARG BUILD_DATE
Expand Down Expand Up @@ -37,7 +37,7 @@ RUN \
pip \
setuptools \
wheel && \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.20/ \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.21/ \
deluge[all]==${DELUGE_VERSION} \
pygeoip && \
echo "**** grab GeoIP database ****" && \
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

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

FROM ghcr.io/by275/libtorrent:1-alpine3.20-arm64 AS libtorrent
FROM ghcr.io/by275/libtorrent:1-alpine3.21-arm64 AS libtorrent

FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.20
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.21

# set version label
ARG BUILD_DATE
Expand Down Expand Up @@ -37,7 +37,7 @@ RUN \
pip \
setuptools \
wheel && \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.20/ \
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.21/ \
deluge[all]==${DELUGE_VERSION} \
pygeoip && \
echo "**** grab GeoIP database ****" && \
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Find us at:
* Plugin System
* Much more...

[![deluge](https://avatars2.githubusercontent.com/u/6733935?v=3&s=200)](http://deluge-torrent.org/)
[![deluge](https://raw.githubusercontent.com/linuxserver/docker-templates/blob/master/linuxserver.io/img/deluge-logo.png)](http://deluge-torrent.org/)

## Supported Architectures

Expand Down Expand Up @@ -83,6 +83,10 @@ Change the inbound port to 6881 (or whichever port you've mapped for the contain

This image can be run with a read-only container filesystem. For details please [read the docs](https://docs.linuxserver.io/misc/read-only/).

## Non-Root Operation

This image can be run with a non-root user. For details please [read the docs](https://docs.linuxserver.io/misc/non-root/).

## Usage

To help you get started creating a container from this image you can either use docker-compose or the docker cli.
Expand Down Expand Up @@ -150,6 +154,7 @@ Containers are configured using parameters passed at runtime (such as those abov
| `-v /config` | deluge configs |
| `-v /downloads` | torrent download directory |
| `--read-only=true` | Run container with a read-only filesystem. Please [read the docs](https://docs.linuxserver.io/misc/read-only/). |
| `--user=1000:1000` | Run container with a non-root user. Please [read the docs](https://docs.linuxserver.io/misc/non-root/). |

## Environment variables from files (Docker secrets)

Expand Down Expand Up @@ -313,6 +318,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **12.01.25:** - Rebase libtorrentv1 branch to Alpine 3.21.
* **19.09.24:** - Prevent race condition related delay during container stop.
* **26.08.24:** - Add libtorrentv1 tag.
* **26.12.23:** - Replace source for GeoIP database.
Expand Down
4 changes: 3 additions & 1 deletion readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# project information
project_name: deluge
project_url: "http://deluge-torrent.org/"
project_logo: "https://avatars2.githubusercontent.com/u/6733935?v=3&s=200"
project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/blob/master/linuxserver.io/img/deluge-logo.png"
project_blurb: |
[{{ project_name|capitalize }}]({{ project_url }}) is a lightweight, Free Software, cross-platform BitTorrent client.
Expand Down Expand Up @@ -40,6 +40,7 @@ opt_param_usage_include_ports: true
opt_param_ports:
- {external_port: "58846", internal_port: "58846", port_desc: "Default deluged port for thin client connectivity"}
readonly_supported: true
nonroot_supported: true
# application setup block
app_setup_block_enabled: true
app_setup_block: |
Expand Down Expand Up @@ -96,6 +97,7 @@ init_diagram: |
"deluge:libtorrentv1" <- Base Images
# changelog
changelogs:
- {date: "12.01.25:", desc: "Rebase libtorrentv1 branch to Alpine 3.21."}
- {date: "19.09.24:", desc: "Prevent race condition related delay during container stop."}
- {date: "26.08.24:", desc: "Add libtorrentv1 tag."}
- {date: "26.12.23:", desc: "Replace source for GeoIP database."}
Expand Down
27 changes: 14 additions & 13 deletions root/etc/s6-overlay/s6-rc.d/init-deluge-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@ fi

mkdir -p /run/deluged-temp

# permissions
lsiown -R abc:abc \
/run/deluged-temp \
/config

# chown download directory if currently not set to abc
if [[ -d /downloads ]]; then
if [[ "$(stat -c '%U' /downloads)" != "abc" ]]; then
lsiown -R abc:abc /downloads
fi
fi

# create torrents directory if it does not exist
if [[ ! -d /config/torrents ]]; then
mkdir -p /config/torrents
lsiown abc:abc /config/torrents
fi

if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
# permissions
lsiown -R abc:abc \
/run/deluged-temp \
/config

# chown download directory if currently not set to abc
if [[ -d /downloads ]]; then
if [[ "$(stat -c '%U' /downloads)" != "abc" ]]; then
lsiown -R abc:abc /downloads
fi
fi
fi
13 changes: 9 additions & 4 deletions root/etc/s6-overlay/s6-rc.d/svc-deluge-web/run
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ if [[ -f /config/web.conf ]]; then
DELUGE_WEB_PORT=$(grep 'port"' /config/web.conf | tr -cd "[:digit:]")
fi

exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 ${DELUGE_WEB_PORT:-8112}" \
s6-setuidgid abc /lsiopy/bin/deluge-web \
-d -c /config --loglevel="${DELUGE_LOGLEVEL}"
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 /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}" \
/lsiopy/bin/deluge-web -d -c /config --loglevel="${DELUGE_LOGLEVEL}"
fi
13 changes: 9 additions & 4 deletions root/etc/s6-overlay/s6-rc.d/svc-deluged/run
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ if [[ -f /config/core.conf ]]; then
DELUGED_PORT=$(grep '"daemon_port"' /config/core.conf | tr -cd "[:digit:]")
fi

exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 ${DELUGED_PORT:-58846}" \
s6-setuidgid abc /lsiopy/bin/deluged -c /config \
-d --loglevel="${DELUGE_LOGLEVEL}"
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 /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}" \
/lsiopy/bin/deluged -c /config -d --loglevel="${DELUGE_LOGLEVEL}"
fi

0 comments on commit b992f5e

Please sign in to comment.