2017-06-04 19:35:55 +02:00
|
|
|
FROM alpine:3.6
|
2016-09-09 17:52:00 +02:00
|
|
|
|
|
|
|
ARG RTORRENT_VER=0.9.6
|
|
|
|
ARG LIBTORRENT_VER=0.13.6
|
2017-10-17 20:08:54 +02:00
|
|
|
ARG MEDIAINFO_VER=0.7.99
|
2017-04-09 07:02:26 +02:00
|
|
|
ARG FILEBOT_VER=4.7.9
|
2017-06-04 19:35:55 +02:00
|
|
|
ARG CHROMAPRINT_VER=1.4.2
|
2017-10-17 20:08:54 +02:00
|
|
|
ARG LIBZEN_VER=0.4.37
|
2017-04-25 14:10:27 +02:00
|
|
|
ARG FLOOD_VER=1.0.0
|
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 \
|
2017-02-22 22:08:50 +01:00
|
|
|
CONTEXT_PATH=/ \
|
2017-03-22 16:04:34 +01:00
|
|
|
RTORRENT_SCGI=0 \
|
2016-09-09 17:52:00 +02:00
|
|
|
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
|
|
|
|
|
2017-06-04 19:35:55 +02:00
|
|
|
ENV FILEBOT_RENAME_METHOD="symlink" \
|
|
|
|
FILEBOT_RENAME_MOVIES="{n} ({y})" \
|
|
|
|
FILEBOT_RENAME_SERIES="{n}/Season {s.pad(2)}/{s00e00} - {t}" \
|
|
|
|
FILEBOT_RENAME_ANIMES="{n}/{e.pad(3)} - {t}" \
|
2017-06-29 04:51:17 +02:00
|
|
|
FILEBOT_RENAME_MUSICS="{artist}/{album}/{fn}"
|
2017-06-04 19:35:55 +02:00
|
|
|
|
2017-01-18 02:55:23 +01:00
|
|
|
RUN NB_CORES=${BUILD_CORES-`getconf _NPROCESSORS_CONF`} \
|
2017-06-04 19:35:55 +02:00
|
|
|
&& apk -U upgrade \
|
|
|
|
&& apk add -t build-dependencies \
|
2016-09-09 17:52:00 +02:00
|
|
|
build-base \
|
|
|
|
git \
|
|
|
|
libtool \
|
|
|
|
automake \
|
|
|
|
autoconf \
|
|
|
|
wget \
|
|
|
|
tar \
|
2017-01-16 22:13:29 +01:00
|
|
|
xz \
|
2017-03-06 10:46:48 +01:00
|
|
|
zlib-dev \
|
2016-09-09 17:52:00 +02:00
|
|
|
cppunit-dev \
|
2017-01-17 23:55:28 +01:00
|
|
|
libressl-dev \
|
2016-09-09 17:52:00 +02:00
|
|
|
ncurses-dev \
|
|
|
|
curl-dev \
|
2017-06-04 19:35:55 +02:00
|
|
|
binutils \
|
|
|
|
&& apk add \
|
2016-09-09 17:52:00 +02:00
|
|
|
ca-certificates \
|
|
|
|
curl \
|
2017-01-18 02:55:23 +01:00
|
|
|
ncurses \
|
|
|
|
libressl \
|
2016-09-09 17:52:00 +02:00
|
|
|
gzip \
|
|
|
|
zip \
|
2017-03-06 10:46:48 +01:00
|
|
|
zlib \
|
2016-09-09 17:52:00 +02:00
|
|
|
unrar \
|
2016-09-17 14:08:45 +02:00
|
|
|
s6 \
|
|
|
|
su-exec \
|
|
|
|
python \
|
2017-01-17 23:55:28 +01:00
|
|
|
nodejs \
|
2017-06-04 19:35:55 +02:00
|
|
|
nodejs-npm \
|
|
|
|
openjdk8-jre \
|
|
|
|
java-jna-native \
|
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 \
|
2017-06-04 19:35:55 +02:00
|
|
|
&& git clone https://github.com/acoustid/chromaprint.git \
|
2016-09-10 16:42:19 +02:00
|
|
|
&& 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 \
|
2017-06-04 19:35:55 +02:00
|
|
|
&& wget -q https://github.com/MediaArea/ZenLib/archive/v${LIBZEN_VER}.tar.gz -O libzen.tar.gz \
|
2017-01-17 23:55:28 +01:00
|
|
|
&& tar xzf MediaInfo_DLL_${MEDIAINFO_VER}_GNU_FromSource.tar.gz \
|
|
|
|
&& tar xzf MediaInfo_CLI_${MEDIAINFO_VER}_GNU_FromSource.tar.gz \
|
2017-06-04 19:35:55 +02:00
|
|
|
&& tar xzf libzen.tar.gz \
|
|
|
|
&& cd /tmp/ZenLib-${LIBZEN_VER}/Project/GNU/Library \
|
|
|
|
&& ./autogen.sh && ./configure --prefix=/usr --enable-shared --disable-static && make && make install \
|
2017-01-17 23:55:28 +01:00
|
|
|
&& 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 \
|
2017-06-04 19:35:55 +02:00
|
|
|
&& wget https://github.com/acoustid/chromaprint/releases/download/v${CHROMAPRINT_VER}/chromaprint-fpcalc-${CHROMAPRINT_VER}-linux-x86_64.tar.gz \
|
|
|
|
&& tar xvf chromaprint-fpcalc-${CHROMAPRINT_VER}-linux-x86_64.tar.gz \
|
|
|
|
&& mv chromaprint-fpcalc-${CHROMAPRINT_VER}-linux-x86_64/fpcalc /usr/local/bin \
|
|
|
|
&& strip -s /usr/local/bin/fpcalc \
|
2017-03-06 10:46:48 +01:00
|
|
|
&& wget -q https://netcologne.dl.sourceforge.net/project/filebot/filebot/FileBot_${FILEBOT_VER}/FileBot_${FILEBOT_VER}-portable.tar.xz \
|
2017-01-16 22:13:29 +01:00
|
|
|
&& tar xJf FileBot_${FILEBOT_VER}-portable.tar.xz && rm FileBot_${FILEBOT_VER}-portable.tar.xz \
|
2017-04-25 14:10:27 +02:00
|
|
|
&& mkdir /usr/flood && cd /usr/flood && wget -qO- https://github.com/jfurrow/flood/archive/v${FLOOD_VER}.tar.gz | tar xz --strip 1 \
|
2017-01-17 23:55:28 +01:00
|
|
|
&& npm install --production \
|
2017-06-04 19:35:55 +02:00
|
|
|
&& ln -sf /usr/local/lib/libmediainfo.so.0.0.0 /filebot/lib/x86_64/libmediainfo.so \
|
|
|
|
&& ln -sf /usr/local/lib/libzen.la /filebot/lib/x86_64/libzen.so \
|
|
|
|
&& ln -sf /usr/local/bin/mediainfo /usr/bin/mediainfo \
|
|
|
|
&& apk del build-dependencies \
|
2016-09-09 17:52:00 +02:00
|
|
|
&& 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
|
|
|
|
2017-01-22 05:23:15 +01:00
|
|
|
VOLUME /data /flood-db
|
2016-09-09 17:52:00 +02:00
|
|
|
|
|
|
|
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" \
|
2017-01-19 02:31:59 +01:00
|
|
|
filebot="Filebot v$FILEBOT_VER" \
|
|
|
|
maintainer="Wonderfall <wonderfall@targaryen.house>"
|
2016-09-09 17:52:00 +02:00
|
|
|
|
2016-09-17 14:08:45 +02:00
|
|
|
CMD ["run.sh"]
|