Skip to content

Commit 468f0b4

Browse files
authored
feat(deluge): add new container (#346)
1 parent 6bf2066 commit 468f0b4

File tree

6 files changed

+210
-0
lines changed

6 files changed

+210
-0
lines changed

apps/deluge/.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/*
2+
!defaults/
3+
!entrypoint.sh

apps/deluge/Dockerfile

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# syntax=docker/dockerfile:1
2+
3+
FROM docker.io/library/alpine:3.21
4+
ARG VERSION
5+
6+
ENV UMASK="0002" \
7+
TZ="Etc/UTC"
8+
9+
ENV DELUGE_BIN="deluged" \
10+
XDG_CONFIG_HOME="/config" \
11+
PYTHON_EGG_CACHE="/config/plugins/.python-eggs"
12+
13+
USER root
14+
15+
RUN \
16+
apk add --no-cache \
17+
bash \
18+
ca-certificates \
19+
catatonit \
20+
coreutils \
21+
curl \
22+
jq \
23+
nano \
24+
p7zip \
25+
tzdata \
26+
&& \
27+
apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing \
28+
deluge=="${VERSION}" \
29+
py3-future \
30+
py3-geoip \
31+
py3-requests \
32+
&& \
33+
mkdir -p /usr/share/GeoIP \
34+
&& \
35+
curl -fsSL "https://mailfud.org/geoip-legacy/GeoIP.dat.gz" \
36+
| gunzip > /usr/share/GeoIP/GeoIP.dat \
37+
&& rm -rf /tmp/*
38+
39+
COPY . /
40+
41+
COPY --from=ghcr.io/linuxserver/unrar:latest /usr/bin/unrar-alpine /usr/bin/unrar
42+
43+
USER nobody:nogroup
44+
WORKDIR /config
45+
VOLUME ["/config"]
46+
47+
ENTRYPOINT ["/usr/bin/catatonit", "--", "/entrypoint.sh"]

apps/deluge/defaults/core.conf

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{
2+
"file": 1,
3+
"format": 1
4+
}{
5+
"add_paused": false,
6+
"allow_remote": false,
7+
"auto_manage_prefer_seeds": false,
8+
"auto_managed": true,
9+
"cache_expiry": 60,
10+
"cache_size": 512,
11+
"copy_torrent_file": false,
12+
"daemon_port": 58846,
13+
"del_copy_torrent_file": false,
14+
"dht": true,
15+
"dont_count_slow_torrents": false,
16+
"download_location": "/downloads",
17+
"download_location_paths_list": [],
18+
"enabled_plugins": [],
19+
"enc_in_policy": 1,
20+
"enc_level": 2,
21+
"enc_out_policy": 1,
22+
"geoip_db_location": "/usr/share/GeoIP/GeoIP.dat",
23+
"ignore_limits_on_local_network": true,
24+
"info_sent": 0.0,
25+
"listen_interface": "",
26+
"listen_ports": [
27+
6881,
28+
6891
29+
],
30+
"listen_random_port": 51765,
31+
"listen_reuse_port": true,
32+
"listen_use_sys_port": false,
33+
"lsd": true,
34+
"max_active_downloading": 3,
35+
"max_active_limit": 8,
36+
"max_active_seeding": 5,
37+
"max_connections_global": 200,
38+
"max_connections_per_second": 20,
39+
"max_connections_per_torrent": -1,
40+
"max_download_speed": -1.0,
41+
"max_download_speed_per_torrent": -1,
42+
"max_half_open_connections": 50,
43+
"max_upload_slots_global": 4,
44+
"max_upload_slots_per_torrent": -1,
45+
"max_upload_speed": -1.0,
46+
"max_upload_speed_per_torrent": -1,
47+
"move_completed": false,
48+
"move_completed_path": "/downloads",
49+
"move_completed_paths_list": [],
50+
"natpmp": true,
51+
"new_release_check": true,
52+
"outgoing_interface": "",
53+
"outgoing_ports": [
54+
0,
55+
0
56+
],
57+
"path_chooser_accelerator_string": "Tab",
58+
"path_chooser_auto_complete_enabled": true,
59+
"path_chooser_max_popup_rows": 20,
60+
"path_chooser_show_chooser_button_on_localhost": true,
61+
"path_chooser_show_hidden_files": false,
62+
"peer_tos": "0x00",
63+
"plugins_location": "/config/plugins",
64+
"pre_allocate_storage": false,
65+
"prioritize_first_last_pieces": false,
66+
"proxy": {
67+
"anonymous_mode": false,
68+
"force_proxy": false,
69+
"hostname": "",
70+
"password": "",
71+
"port": 8080,
72+
"proxy_hostnames": true,
73+
"proxy_peer_connections": true,
74+
"proxy_tracker_connections": true,
75+
"type": 0,
76+
"username": ""
77+
},
78+
"queue_new_to_top": false,
79+
"random_outgoing_ports": true,
80+
"random_port": true,
81+
"rate_limit_ip_overhead": true,
82+
"remove_seed_at_ratio": false,
83+
"seed_time_limit": 180,
84+
"seed_time_ratio_limit": 7.0,
85+
"send_info": false,
86+
"sequential_download": false,
87+
"share_ratio_limit": 2.0,
88+
"shared": false,
89+
"stop_seed_at_ratio": false,
90+
"stop_seed_ratio": 2.0,
91+
"super_seeding": false,
92+
"torrentfiles_location": "/config/torrents",
93+
"upnp": true,
94+
"utpex": true
95+
}

apps/deluge/docker-bake.hcl

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
target "docker-metadata-action" {}
2+
3+
variable "VERSION" {
4+
// renovate: datasource=repology depName=alpine_edge/deluge
5+
default = "2.1.1-r10"
6+
}
7+
8+
variable "SOURCE" {
9+
default = "https://github.com/deluge-torrent/deluge"
10+
}
11+
12+
group "default" {
13+
targets = ["image-local"]
14+
}
15+
16+
target "image" {
17+
inherits = ["docker-metadata-action"]
18+
args = {
19+
VERSION = "${VERSION}"
20+
}
21+
labels = {
22+
"org.opencontainers.image.source" = "${SOURCE}"
23+
}
24+
}
25+
26+
target "image-local" {
27+
inherits = ["image"]
28+
output = ["type=docker"]
29+
}
30+
31+
target "image-all" {
32+
inherits = ["image"]
33+
platforms = [
34+
"linux/amd64",
35+
"linux/arm64"
36+
]
37+
}

apps/deluge/entrypoint.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
#shellcheck disable=SC2086,SC2090
3+
4+
if [[ ! -f /config/core.conf ]]; then
5+
cp /defaults/core.conf /config/core.conf
6+
fi
7+
8+
mkdir -p /config/plugins/.python-eggs
9+
10+
exec \
11+
${DELUGE_BIN:-deluged} \
12+
--do-not-daemonize \
13+
--config /config \
14+
--loglevel ${DELUGE_LOGLEVEL:-info} \
15+
"$@"

apps/deluge/tests.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
# yaml-language-server: $schema=https://raw.githubusercontent.com/goss-org/goss/master/docs/schema.yaml
3+
process:
4+
deluged:
5+
running: true
6+
port:
7+
tcp:58846:
8+
listening: true
9+
file:
10+
/usr/bin/python3:
11+
exists: true
12+
/usr/bin/unrar:
13+
exists: true

0 commit comments

Comments
 (0)