forked from Wonderfall/docker-rtorrent-flood
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
89 lines (80 loc) · 3.06 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
FROM alpine:3.14
ARG RTORRENT_VER=0.9.8
ARG LIBTORRENT_VER=0.13.8
ARG MEDIAINFO_VER=21.03
ARG FLOOD_VER=4.7.0
ARG BUILD_CORES
ENV UID=991 GID=991 \
FLOOD_SECRET=supersecret30charactersminimum \
WEBROOT=/ \
DISABLE_AUTH=false \
RTORRENT_SOCK=true \
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
RUN NB_CORES=${BUILD_CORES-`getconf _NPROCESSORS_CONF`} \
&& apk -U upgrade \
&& apk add -t build-dependencies \
build-base \
git \
libtool \
automake \
autoconf \
wget \
tar \
xz \
zlib-dev \
cppunit-dev \
openssl-dev \
ncurses-dev \
curl-dev \
binutils \
linux-headers \
&& apk add \
ca-certificates \
curl \
ncurses \
openssl \
gzip \
zip \
zlib \
s6 \
su-exec \
python2 \
nodejs \
npm \
unrar \
findutils \
&& cd /tmp && mkdir libtorrent rtorrent \
&& cd libtorrent && wget -qO- https://github.com/rakshasa/libtorrent/archive/v${LIBTORRENT_VER}.tar.gz | tar xz --strip 1 \
&& cd ../rtorrent && wget -qO- https://github.com/rakshasa/rtorrent/releases/download/v${RTORRENT_VER}/rtorrent-${RTORRENT_VER}.tar.gz | tar xz --strip 1 \
&& cd /tmp \
&& git clone https://github.com/mirror/xmlrpc-c.git \
&& cd /tmp/xmlrpc-c/advanced && ./configure && make -j ${NB_CORES} && make install \
&& cd /tmp/libtorrent && ./autogen.sh && ./configure && make -j ${NB_CORES} && make install \
&& cd /tmp/rtorrent && ./autogen.sh && ./configure --with-xmlrpc-c && make -j ${NB_CORES} && make install \
&& cd /tmp \
&& wget -q http://mediaarea.net/download/binary/mediainfo/${MEDIAINFO_VER}/MediaInfo_CLI_${MEDIAINFO_VER}_GNU_FromSource.tar.gz \
&& wget -q http://mediaarea.net/download/binary/libmediainfo0/${MEDIAINFO_VER}/MediaInfo_DLL_${MEDIAINFO_VER}_GNU_FromSource.tar.gz \
&& tar xzf MediaInfo_DLL_${MEDIAINFO_VER}_GNU_FromSource.tar.gz \
&& tar xzf MediaInfo_CLI_${MEDIAINFO_VER}_GNU_FromSource.tar.gz \
&& cd /tmp/MediaInfo_DLL_GNU_FromSource && ./SO_Compile.sh \
&& cd /tmp/MediaInfo_DLL_GNU_FromSource/ZenLib/Project/GNU/Library && make install \
&& cd /tmp/MediaInfo_DLL_GNU_FromSource/MediaInfoLib/Project/GNU/Library && make install \
&& cd /tmp/MediaInfo_CLI_GNU_FromSource && ./CLI_Compile.sh \
&& cd /tmp/MediaInfo_CLI_GNU_FromSource/MediaInfo/Project/GNU/CLI && make install \
&& strip -s /usr/local/bin/rtorrent \
&& strip -s /usr/local/bin/mediainfo \
&& ln -sf /usr/local/bin/mediainfo /usr/bin/mediainfo \
&& mkdir /usr/flood && cd /usr/flood && wget -qO- https://github.com/jesec/flood/archive/v${FLOOD_VER}.tar.gz | tar xz --strip 1 \
&& npm install && npm cache clean --force \
&& apk del build-dependencies \
&& rm -rf /var/cache/apk/* /tmp/*
COPY rootfs /
RUN chmod +x /usr/local/bin/* /etc/s6.d/*/* /etc/s6.d/.s6-svscan/* \
&& cd /usr/flood/ && npm run build
VOLUME /data /flood-db
EXPOSE 3000 49184 49184/udp
LABEL description="BitTorrent client with WebUI front-end" \
rtorrent="rTorrent BiTorrent client v$RTORRENT_VER" \
libtorrent="libtorrent v$LIBTORRENT_VER" \
maintainer="Wonderfall <[email protected]>"
CMD ["run.sh"]