Skip to content

Commit 4131d97

Browse files
committed
Initial commit
0 parents  commit 4131d97

File tree

8 files changed

+1669
-0
lines changed

8 files changed

+1669
-0
lines changed

Dockerfile

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
FROM osixia/light-baseimage:1.1.1
2+
3+
#########################################
4+
## SET LABELS ##
5+
#########################################
6+
7+
# set version and maintainer label
8+
ARG BUILD_DATE
9+
ARG VERSION
10+
LABEL build_version="Version:- ${VERSION} Build-date:- ${BUILD_DATE}"
11+
LABEL maintainer="Logicwar <[email protected]>"
12+
13+
14+
#########################################
15+
## ENVIRONMENTAL CONFIG ##
16+
#########################################
17+
18+
# Set correct environment variables
19+
ENV LC_ALL="en_US.UTF-8" LANG="en_US.UTF-8" LANGUAGE="en_US.UTF-8"
20+
ENV DEBIAN_FRONTEND=noninteractive MLDONKEY_DIR="/var/lib/mldonkey"
21+
22+
#########################################
23+
## DOWNLOAD PACKAGES ##
24+
#########################################
25+
26+
# Download and install Dependencies & Main Software
27+
RUN \
28+
echo "**** Install Dependencies & Main Software ****" && \
29+
apt-get update && \
30+
apt-get install --no-install-recommends -y \
31+
mldonkey-server && \
32+
rm -rf \
33+
/var/lib/apt/lists/* \
34+
/tmp/* \
35+
/var/tmp/* \
36+
/var/log/mldonkey \
37+
/var/lib/mldonkey/*
38+
39+
#########################################
40+
## COPY & RUN SETUP SCRIPT ##
41+
#########################################
42+
# copy setup, default parameters and init files
43+
COPY service /container/service
44+
COPY defaults /defaults
45+
46+
# set permissions and run install-service script
47+
RUN \
48+
chmod -R +x /container/service && \
49+
/container/tool/install-service
50+
51+
52+
#########################################
53+
## EXPORTS AND VOLUMES ##
54+
#########################################
55+
56+
EXPOSE 4000 4001 4080 20562 20566/udp 16965 16965/udp 6209 6209/udp 6881 6882 3617/udp 4444 4444/udp
57+
VOLUME /var/lib/mldonkey /mnt/mldonkey_tmp /mnt/mldonkey_completed
58+

README.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
[hub]:https://hub.docker.com/r/logicwar/mldonkey/
2+
[MLDonkey_wikipedia]:https://en.wikipedia.org/wiki/MLDonkey
3+
[tz_wikipedia]:https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
4+
5+
# [Docker Container for MLDonkey][hub]
6+
7+
This is a Docker image based on osixia/light-baseimage for running MLDonkey 3.1.5.
8+
9+
MLDonkey is an open source, multi-protocol, peer-to-peer file sharing application that runs as a back-end server application on many platforms. It can be controlled through a user interface provided by one of many separate front-ends, including a Web interface, telnet interface and over a dozen native client programs. [Wikipedia][MLDonkey_wikipedia]
10+
11+
MLDonkey is free software, released under the terms of the GNU General Public License.
12+
13+
## Usage
14+
15+
```
16+
docker create --name=mldonkey \
17+
-v <path for config files>:/var/lib/mldonkey:rw \
18+
-v <path for temporary files>:/mnt/mldonkey_tmp:rw \
19+
-v <path for completed downloaded files>:/mnt/mldonkey_completed:rw \
20+
-e PGID=<gid>
21+
-e PUID=<uid> \
22+
-e TZ=<timezone> \
23+
-p 4000:4000 \
24+
-p 4001:4001 \
25+
-p 4080:4080 \
26+
-p 20562:20562 \
27+
-p 20566:20566/udp \
28+
-p 16965:16965 \
29+
-p 16965:16965/udp \
30+
-p 6209:6209 \
31+
-p 6209:6209/udp \
32+
-p 6881:6881 \
33+
-p 6882:6882 \
34+
-p 3617:3617/udp \
35+
-p 4444:4444 \
36+
-p 4444:4444/udp \
37+
logicwar/mldonkey
38+
```
39+
40+
## Parameters
41+
* `-p 4000` - Telnet port
42+
* `-p 4001` - GUI port
43+
* `-p 4080` - HTTP port for the Web interface
44+
* `-p 20562` - eDonkey2000 port
45+
* `-p 20566/udp` - eDonkey2000 port
46+
* `-p 16965` - Kad port (disabled by default)
47+
* `-p 16965/udp` - Kad1 port (disabled by default)
48+
* `-p 6209` - Overnet port (disabled by default)
49+
* `-p 6209/udp` - Overnet port (disabled by default)
50+
* `-p 6881` - BitTorrent Client port (disabled by default)
51+
* `-p 6882`- BitTorrent Tracker port (disabled by default)
52+
* `-p 3617/udp` - BitTorrent DHT port (disabled by default)
53+
* `-p 4444` - BitTorrent DHT port (disabled by default)
54+
* `-p 4444/udp` - BitTorrent DHT port (disabled by default)
55+
* `-v /var/lib/mldonkey` - where LMS stores config and log files
56+
* `-v /mnt/mldonkey_tmp` - local path for your audios
57+
* `-v /mnt/mldonkey_completed` - local path for your playlists
58+
* `-e PGID` for GroupID - see below for explanation
59+
* `-e PUID` for UserID - see below for explanation
60+
* `-e TZ` for timezone information : Europe/London, Europe/Zurich, America/New_York, ... ([List of TZ][tz_wikipedia])
61+
62+
For shell access while the container is running do `docker exec -it mldonkey /bin/bash`
63+
64+
### User / Group ID
65+
66+
For security reasons and to avoid permissions issues with data volumes (`-v` flags), you may want to create a specific "docker" user with proper right accesses on your persistant folders. To find your user **uid** and **gid** you can use the `id <user>` command as below:
67+
68+
```
69+
$ id <dockeruser>
70+
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
71+
```
72+
73+
and finally specify your "docker" user `PUID` and group `PGID`. In this exemple `PUID=1001` and `PGID=1001`.
74+
75+
## Setting up the application
76+
77+
The intitial setup is made by browsing to http://your_server_IP:4080 and begin configuring the MDDonkey Server.
78+
79+
The first thing to do is to **set a password for the admin user**. you can use the command in the input field: `useradd admin <your_password>`
80+
81+
By default only eDonkey is enabled. To enable the other networks go to `Options->Net` and set to `true` what you need.
82+
83+
## Container default configuation
84+
|Network|Type|MLDonkey default|Default Container Setup|Configuration file|
85+
|---|---|---|---|---|
86+
|http_port|TCP|4080|4080|downloads.ini|
87+
|telnet_port|TCP|4000|4000|downloads.ini|
88+
|gui_port|TCP|4001|4001|downloads.ini|
89+
|eDonkey2000|TCP|random|20562|donkey.ini|
90+
|eDonkey2000|UDP|TCP port + 4|20566|donkey.ini|
91+
|Kad|TCP|random|16965|donkey.ini, Kademlia section|
92+
|Kad1|UDP|Same as TCP|16965|donkey.ini, Kademlia section|
93+
|Overnet|TCP|random|6209|donkey.ini, Overnet section|
94+
|Overnet|UDP|Same as TCP|6209|donkey.ini, Overnet section|
95+
|BitTorrent Client |TCP|6882|6882|bittorrent.ini|
96+
|BitTorrent Tracker |TCP|6881|6881|bittorrent.ini|
97+
|BitTorrent DHT |UDP|random|3617|bittorrent.ini|
98+
|DirectConnect|TCP|4444|4444|directconnect.ini|
99+
|DirectConnect|UDP|Same as TCP|4444|directconnect.ini|
100+
101+
102+
103+
## Versions
104+
+ **V0.1** Initial Release 3.1.5

defaults/bittorrent.ini

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
2+
3+
(************************************)
4+
(* Never edit options files when *)
5+
(* the daemon is running *)
6+
(************************************)
7+
(* SECTION : Bittorrent *)
8+
(* Bittorrent options *)
9+
(************************************)
10+
11+
12+
13+
(* The port to bind the client to *)
14+
(* changing this option requires restart of MLDonkey core *)
15+
client_port = 6882
16+
17+
(* The UID of this client *)
18+
client_uid = FVGUYMZOGEXDKLJICHD5GTB55TNPTOGF
19+
20+
(* Ask the tracker for new sources only if you have fewer than that number of sources *)
21+
ask_tracker_threshold = 20
22+
23+
(* Maximum number of HTTP redirects before reaching the tracker - maximum 10, 0 to disable *)
24+
max_tracker_redirect = 1
25+
26+
(* Send client key to trackers *)
27+
send_key = true
28+
29+
(* Maximum number of uploaders for bittorrent, can not be higher than max_upload_slots *)
30+
max_bt_uploaders = 3
31+
32+
(* Maximum number of uploaders for one torrent, can not be higher than max_bt_uploaders *)
33+
max_uploaders_per_torrent = 3
34+
35+
(* Number of peers to request from tracker (Negative # = let tracker decide) *)
36+
numwant = -1
37+
38+
(* Interval in seconds 'torrents/incoming' is scanned for new torrent files to be downloaded, 0 to deactivate *)
39+
(* changing this option requires restart of MLDonkey core *)
40+
import_new_torrents_interval = 60.
41+
42+
(* Number of retries before a tracker is disabled, use 0 to not disable trackers *)
43+
tracker_retries = 10
44+
45+
(* Minimum time in seconds to wait between asking the tracker for sources *)
46+
min_tracker_reask_interval = 300
47+
48+
(* Timeout on client connections *)
49+
client_timeout = 90.
50+
51+
(* User agent string (default = "default") *)
52+
user_agent = default
53+
54+
(* (internal option) *)
55+
(* Do not change this option, internal use only! *)
56+
options_version = 0
57+
old_files = []
58+
tracked_files = []
59+
60+
(* DHT port (UDP, set 0 to disable) *)
61+
dht_port = 3617
62+
63+
(* Send announces to trackers *)
64+
use_trackers = true
65+
66+
(* Addresses of nodes used to bootstrap DHT network. Tried in order until enough nodes are found. *)
67+
dht_bootstrap_nodes = [
68+
"service.ygrek.org.ua:6881";
69+
"router.utorrent.com:6881";
70+
"router.transmission.com:6881";]
71+
72+
(* The port to bind the tracker to (0 to disable) *)
73+
(* changing this option requires restart of MLDonkey core *)
74+
tracker_port = 6881
75+
76+
(* The maximum number of tracked files (to prevent saturation attack) *)
77+
max_tracked_files = 100
78+
79+
(* The maximum number of peers returned by the tracker *)
80+
max_tracker_reply = 20
81+
82+
(* The tracker will track only torrents available locally *)
83+
tracker_force_local_torrents = true
84+
85+
(* The tracker will check the client key to update ip if changed *)
86+
tracker_use_key = true
87+
88+
(* Default tracker for creating torrents (leave empty for builtin tracker) *)
89+
default_tracker = ""
90+
91+
(* Default comment for creating torrents *)
92+
default_comment = ""
93+
94+
(*
95+
The following options are not used (errors, obsolete, ...)
96+
*)

0 commit comments

Comments
 (0)