-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
49 lines (41 loc) · 1.41 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
FROM vsense/baseimage:alpine
MAINTAINER vSense <[email protected]>
RUN apk add --update \
rtorrent \
nginx \
php7 \
php7-fpm \
php7-json \
curl \
gzip \
zip \
unrar \
supervisor \
git \
geoip \
ffmpeg \
&& git clone https://github.com/Novik/ruTorrent.git /rutorrent \
&& mkdir -p /tmp/nginx/client-body /downloads/incoming /downloads/completed /downloads/watched /downloads/sessions /tmp/rtorrent \
&& adduser -D -h / -u 5001 rtorrent \
&& chown -R rtorrent:rtorrent /downloads /rutorrent /tmp/rtorrent /var/lib/nginx /var/tmp/nginx \
&& sed -i \
-e 's/group =.*/group = rtorrent/' \
-e 's/user =.*/user = rtorrent/' \
-e 's/listen\.owner.*/listen\.owner = rtorrent/' \
-e 's/listen\.group.*/listen\.group = rtorrent/' \
-e 's/error_log =.*/error_log = \/dev\/stdout/' \
/etc/php7/php-fpm.d/www.conf \
&& sed -i \
-e '/open_basedir =/s/^/\;/' \
/etc/php7/php.ini \
&& sed -i \
-e "/curl/ s/''/'\/usr\/bin\/curl'/" \
-e "/php/ s/''/'\/usr\/bin\/php7'/" \
/rutorrent/conf/config.php \
&& rm -rf /var/cache/apk/*
COPY supervisord-rtorrent.ini /etc/supervisor.d/supervisord-rtorrent.ini
COPY nginx.conf /etc/nginx/nginx.conf
COPY rtorrent.conf /.rtorrent.rc
VOLUME /downloads /rutorrent
EXPOSE 80 5000 6881 51413
CMD ["supervisord", "-c", "/etc/supervisord.conf", "-n"]