2017-01-17 23:55:28 +01:00
|
|
|
FROM alpine:3.5
|
2016-09-09 17:52:00 +02:00
|
|
|
MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
|
|
|
|
|
|
|
ARG RTORRENT_VER=0.9.6
|
|
|
|
ARG LIBTORRENT_VER=0.13.6
|
2017-01-17 23:55:28 +01:00
|
|
|
ARG MEDIAINFO_VER=0.7.91
|
2017-01-16 22:13:29 +01:00
|
|
|
ARG FILEBOT_VER=4.7.7
|
2016-09-09 17:52:00 +02:00
|
|
|
ARG BUILD_CORES
|
|
|
|
|
2016-09-17 14:08:45 +02:00
|
|
|
ENV UID=991 GID=991 \
|
2016-09-09 17:52:00 +02:00
|
|
|
FLOOD_SECRET=supersecret \
|
|
|
|
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
|
|
|
|
|
2017-01-18 02:55:23 +01:00
|
|
|
RUN NB_CORES=${BUILD_CORES-`getconf _NPROCESSORS_CONF`} \
|
2016-09-09 17:52:00 +02:00
|
|
|
&& BUILD_DEPS=" \
|
|
|
|
build-base \
|
|
|
|
git \
|
|
|
|
libtool \
|
|
|
|
automake \
|
|
|
|
autoconf \
|
|
|
|
wget \
|
|
|
|
tar \
|
2017-01-16 22:13:29 +01:00
|
|
|
xz \
|
2016-09-09 17:52:00 +02:00
|
|
|
subversion \
|
|
|
|
cppunit-dev \
|
2017-01-17 23:55:28 +01:00
|
|
|
libressl-dev \
|
2016-09-09 17:52:00 +02:00
|
|
|
ncurses-dev \
|
|
|
|
curl-dev \
|
|
|
|
binutils" \
|
|
|
|
&& apk -U add \
|
|
|
|
${BUILD_DEPS} \
|
|
|
|
ca-certificates \
|
|
|
|
curl \
|
2017-01-18 02:55:23 +01:00
|
|
|
ncurses \
|
|
|
|
libressl \
|
2016-09-09 17:52:00 +02:00
|
|
|
gzip \
|
|
|
|
zip \
|
|
|
|
unrar \
|
2016-09-17 14:08:45 +02:00
|
|
|
s6 \
|
|
|
|
su-exec \
|
|
|
|
python \
|
2017-01-17 23:55:28 +01:00
|
|
|
nodejs \
|
2017-01-18 02:55:23 +01:00
|
|
|
&& apk add -X http://dl-cdn.alpinelinux.org/alpine/v3.4/community -U openjdk8-jre==8.111.14-r0 openjdk8-jre-base==8.111.14-r0 openjdk8-jre-lib==8.111.14-r0 \
|
2016-09-10 16:42:19 +02:00
|
|
|
&& cd /tmp && mkdir libtorrent rtorrent \
|
2016-09-09 17:52:00 +02:00
|
|
|
&& cd libtorrent && wget -qO- https://github.com/rakshasa/libtorrent/archive/${LIBTORRENT_VER}.tar.gz | tar xz --strip 1 \
|
|
|
|
&& cd ../rtorrent && wget -qO- https://github.com/rakshasa/rtorrent/archive/${RTORRENT_VER}.tar.gz | tar xz --strip 1 \
|
|
|
|
&& cd /tmp \
|
2016-09-10 16:42:19 +02:00
|
|
|
&& git clone https://github.com/mirror/xmlrpc-c.git \
|
|
|
|
&& git clone https://github.com/Rudde/mktorrent.git \
|
|
|
|
&& cd /tmp/mktorrent && make -j ${NB_CORES} && make install \
|
2017-01-16 22:13:29 +01:00
|
|
|
&& cd /tmp/xmlrpc-c/stable && ./configure && make -j ${NB_CORES} && make install \
|
2016-09-10 16:42:19 +02:00
|
|
|
&& 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 \
|
2017-01-17 23:55:28 +01:00
|
|
|
&& 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 \
|
2016-09-10 16:42:19 +02:00
|
|
|
&& strip -s /usr/local/bin/rtorrent \
|
|
|
|
&& strip -s /usr/local/bin/mktorrent \
|
2017-01-17 23:55:28 +01:00
|
|
|
&& strip -s /usr/local/bin/mediainfo \
|
2017-01-16 22:13:29 +01:00
|
|
|
&& mkdir /filebot && cd /filebot \
|
|
|
|
&& wget -q http://sourceforge.mirrorservice.org/f/fi/filebot/filebot/FileBot_${FILEBOT_VER}/FileBot_${FILEBOT_VER}-portable.tar.xz \
|
|
|
|
&& tar xJf FileBot_${FILEBOT_VER}-portable.tar.xz && rm FileBot_${FILEBOT_VER}-portable.tar.xz \
|
2016-09-09 17:52:00 +02:00
|
|
|
&& cd /usr && git clone https://github.com/jfurrow/flood && cd flood \
|
2017-01-17 23:55:28 +01:00
|
|
|
&& npm install --production \
|
2016-09-09 17:52:00 +02:00
|
|
|
&& apk del ${BUILD_DEPS} \
|
|
|
|
&& rm -rf /var/cache/apk/* /tmp/*
|
|
|
|
|
|
|
|
COPY config.js /usr/flood/
|
2016-09-17 14:08:45 +02:00
|
|
|
COPY s6.d /etc/s6.d
|
|
|
|
COPY run.sh /usr/bin/
|
2016-09-09 17:52:00 +02:00
|
|
|
COPY postdl /usr/bin/
|
|
|
|
COPY postrm /usr/bin/
|
|
|
|
COPY config.js /usr/flood/
|
|
|
|
COPY rtorrent.rc /home/torrent/.rtorrent.rc
|
|
|
|
|
2017-01-17 23:55:28 +01:00
|
|
|
RUN chmod +x /usr/bin/* /etc/s6.d/*/* /etc/s6.d/.s6-svscan/*
|
2016-09-09 17:52:00 +02:00
|
|
|
|
|
|
|
VOLUME /data /usr/flood/server/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" \
|
|
|
|
filebot="Filebot v$FILEBOT_VER"
|
|
|
|
|
2016-09-17 14:08:45 +02:00
|
|
|
CMD ["run.sh"]
|