-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
92 lines (86 loc) · 2.83 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
FROM alpine:3.5
MAINTAINER Albert Dixon <[email protected]>
ENTRYPOINT ["/sbin/tini", "-g","--", "/sbin/entry"]
CMD ["/sbin/start"]
EXPOSE 9091
ENV T2_VER=v2.2.1 \
TRANSMON_VER=v0.2.3
WORKDIR /
RUN apk add --update --no-cache \
bash \
ca-certificates \
curl \
openvpn \
tar \
tini \
transmission-daemon \
unzip \
&& mkdir -vp \
/certs \
/etc/pia_transmission_monitor \
/openvpn \
/transmission/openvpn \
/web \
&& curl -L -o t2.tgz https://github.com/albertrdixon/tmplnator/releases/download/${T2_VER}/t2-linux.tgz \
&& curl -L -o transmon.tgz https://github.com/albertrdixon/transmon/releases/download/${TRANSMON_VER}/transmon-linux.tgz \
&& curl -L -o web.tgz https://github.com/balonik/transmission-web-control/raw/master/release/transmission-control-full.tar.gz \
&& curl -kL -o openvpn.zip https://www.privateinternetaccess.com/openvpn/openvpn.zip \
&& tar xvzf /t2.tgz -C /bin \
&& tar xvzf /transmon.tgz -C /bin \
&& tar xvzf /web.tgz -C /web \
&& unzip -Lj /openvpn.zip ca.*.crt crl.*.pem -d /openvpn \
&& mv -vf /openvpn/ca.*.crt /certs/pia.crt \
&& mv -vf /openvpn/crl.*.pem /certs/pia.pem \
&& deluser transmission \
&& rm -rvf /openvpn* /*.tgz
COPY bashrc /root/.bashrc
COPY configs /templates
COPY scripts/completed.sh /scripts/completed.sh
COPY ["scripts/entry", "scripts/start", "/sbin/"]
RUN chmod +rx /sbin/entry /sbin/start /scripts/completed.sh
ENV CACHE_SIZE=50 \
CLEANER_ENABLED=true \
COMPLETED_SCRIPT=/scripts/completed.sh \
COMPLETED_SCRIPT_ENABLED=false \
CONGESTION=lp \
DOWNLOAD_DIR=/downloads \
DOWNLOAD_QUEUE_ENABLED=true \
DOWNLOAD_QUEUE_SIZE=3 \
IDLE_SEEDING_LIMIT=10 \
MESSAGE_LEVEL=1 \
OPEN_FILE_LIMIT=32768 \
OPENVPN_GATEWAY=ca-toronto.privateinternetaccess.com \
OPENVPN_GATEWAY_PORT=1198 \
OPENVPN_HOME=/transmission/openvpn \
OPENVPN_LOG=/dev/stderr \
OPENVPN_MUTE=20 \
OPENVPN_PROTO=udp \
OPENVPN_VERB=3 \
PATH=/usr/local/bin:$PATH \
PEER_LIMIT_GLOBAL=1200 \
PEER_LIMIT_PER_TORRENT=180 \
PEER_PORT=51234 \
QUEUE_STALLED_ENABLED=true \
QUEUE_STALLED_MINUTES=5 \
RATIO_LIMIT=1 \
RATIO_LIMIT_ENABLED=true \
RPC_AUTHENTICATION_REQUIRED=false \
RPC_PASSWORD=client \
RPC_PORT=9091 \
RPC_USERNAME=client \
SEED_QUEUE_ENABLED=true \
SEED_QUEUE_SIZE=2 \
SPEED_LIMIT_DOWN=5000 \
SPEED_LIMIT_DOWN_ENABLED=false \
SPEED_LIMIT_UP=400 \
SPEED_LIMIT_UP_ENABLED=true \
SUPERVISOR_LOG_LEVEL=INFO \
TRANSMISSION_HOME=/transmission \
TRANSMISSION_LOG_LEVEL=info \
TRANSMISSION_WEB_HOME=/web \
TRANSMISSION_UID=7000 \
TRANSMISSION_GID=7000 \
TRANSMON_LOG_LEVEL=info \
UPLOAD_SLOTS_PER_TORRENT=14 \
WATCH_DIR=/torrents \
WATCH_DIR_ENABLED=false