Skip to content

Commit b992f5e

Browse files
authored
Merge pull request #211 from linuxserver/v1-3.21
2 parents cbdecd4 + b0c1f43 commit b992f5e

7 files changed

Lines changed: 48 additions & 29 deletions

File tree

Dockerfile

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

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

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

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

99
# set version label
1010
ARG BUILD_DATE
@@ -37,7 +37,7 @@ RUN \
3737
pip \
3838
setuptools \
3939
wheel && \
40-
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.20/ \
40+
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.21/ \
4141
deluge[all]==${DELUGE_VERSION} \
4242
pygeoip && \
4343
echo "**** grab GeoIP database ****" && \

Dockerfile.aarch64

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

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

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

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

99
# set version label
1010
ARG BUILD_DATE
@@ -37,7 +37,7 @@ RUN \
3737
pip \
3838
setuptools \
3939
wheel && \
40-
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.20/ \
40+
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.21/ \
4141
deluge[all]==${DELUGE_VERSION} \
4242
pygeoip && \
4343
echo "**** grab GeoIP database ****" && \

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Find us at:
4646
* Plugin System
4747
* Much more...
4848

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

5151
## Supported Architectures
5252

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

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

86+
## Non-Root Operation
87+
88+
This image can be run with a non-root user. For details please [read the docs](https://docs.linuxserver.io/misc/non-root/).
89+
8690
## Usage
8791

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

154159
## Environment variables from files (Docker secrets)
155160

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

314319
## Versions
315320

321+
* **12.01.25:** - Rebase libtorrentv1 branch to Alpine 3.21.
316322
* **19.09.24:** - Prevent race condition related delay during container stop.
317323
* **26.08.24:** - Add libtorrentv1 tag.
318324
* **26.12.23:** - Replace source for GeoIP database.

readme-vars.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# project information
44
project_name: deluge
55
project_url: "http://deluge-torrent.org/"
6-
project_logo: "https://avatars2.githubusercontent.com/u/6733935?v=3&s=200"
6+
project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/blob/master/linuxserver.io/img/deluge-logo.png"
77
project_blurb: |
88
[{{ project_name|capitalize }}]({{ project_url }}) is a lightweight, Free Software, cross-platform BitTorrent client.
99
@@ -40,6 +40,7 @@ opt_param_usage_include_ports: true
4040
opt_param_ports:
4141
- {external_port: "58846", internal_port: "58846", port_desc: "Default deluged port for thin client connectivity"}
4242
readonly_supported: true
43+
nonroot_supported: true
4344
# application setup block
4445
app_setup_block_enabled: true
4546
app_setup_block: |
@@ -96,6 +97,7 @@ init_diagram: |
9697
"deluge:libtorrentv1" <- Base Images
9798
# changelog
9899
changelogs:
100+
- {date: "12.01.25:", desc: "Rebase libtorrentv1 branch to Alpine 3.21."}
99101
- {date: "19.09.24:", desc: "Prevent race condition related delay during container stop."}
100102
- {date: "26.08.24:", desc: "Add libtorrentv1 tag."}
101103
- {date: "26.12.23:", desc: "Replace source for GeoIP database."}

root/etc/s6-overlay/s6-rc.d/init-deluge-config/run

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,21 @@ fi
77

88
mkdir -p /run/deluged-temp
99

10-
# permissions
11-
lsiown -R abc:abc \
12-
/run/deluged-temp \
13-
/config
14-
15-
# chown download directory if currently not set to abc
16-
if [[ -d /downloads ]]; then
17-
if [[ "$(stat -c '%U' /downloads)" != "abc" ]]; then
18-
lsiown -R abc:abc /downloads
19-
fi
20-
fi
21-
2210
# create torrents directory if it does not exist
2311
if [[ ! -d /config/torrents ]]; then
2412
mkdir -p /config/torrents
25-
lsiown abc:abc /config/torrents
13+
fi
14+
15+
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
16+
# permissions
17+
lsiown -R abc:abc \
18+
/run/deluged-temp \
19+
/config
20+
21+
# chown download directory if currently not set to abc
22+
if [[ -d /downloads ]]; then
23+
if [[ "$(stat -c '%U' /downloads)" != "abc" ]]; then
24+
lsiown -R abc:abc /downloads
25+
fi
26+
fi
2627
fi

root/etc/s6-overlay/s6-rc.d/svc-deluge-web/run

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ if [[ -f /config/web.conf ]]; then
77
DELUGE_WEB_PORT=$(grep 'port"' /config/web.conf | tr -cd "[:digit:]")
88
fi
99

10-
exec \
11-
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 ${DELUGE_WEB_PORT:-8112}" \
12-
s6-setuidgid abc /lsiopy/bin/deluge-web \
13-
-d -c /config --loglevel="${DELUGE_LOGLEVEL}"
10+
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
11+
exec \
12+
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 ${DELUGE_WEB_PORT:-8112}" \
13+
s6-setuidgid abc /lsiopy/bin/deluge-web -d -c /config --loglevel="${DELUGE_LOGLEVEL}"
14+
else
15+
exec \
16+
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 ${DELUGE_WEB_PORT:-8112}" \
17+
/lsiopy/bin/deluge-web -d -c /config --loglevel="${DELUGE_LOGLEVEL}"
18+
fi

root/etc/s6-overlay/s6-rc.d/svc-deluged/run

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ if [[ -f /config/core.conf ]]; then
77
DELUGED_PORT=$(grep '"daemon_port"' /config/core.conf | tr -cd "[:digit:]")
88
fi
99

10-
exec \
11-
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 ${DELUGED_PORT:-58846}" \
12-
s6-setuidgid abc /lsiopy/bin/deluged -c /config \
13-
-d --loglevel="${DELUGE_LOGLEVEL}"
10+
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
11+
exec \
12+
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 ${DELUGED_PORT:-58846}" \
13+
s6-setuidgid abc /lsiopy/bin/deluged -c /config -d --loglevel="${DELUGE_LOGLEVEL}"
14+
else
15+
exec \
16+
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 ${DELUGED_PORT:-58846}" \
17+
/lsiopy/bin/deluged -c /config -d --loglevel="${DELUGE_LOGLEVEL}"
18+
fi

0 commit comments

Comments
 (0)