diff --git a/Dockerfiles/rtorrent/Dockerfile b/Dockerfiles/rtorrent/Dockerfile index 7c98ed5..d02862e 100644 --- a/Dockerfiles/rtorrent/Dockerfile +++ b/Dockerfiles/rtorrent/Dockerfile @@ -1,20 +1,35 @@ FROM kelvinchen/seedbox:base MAINTAINER Kelvin Chen +# Install all dependencies RUN apt-get update && \ apt-get install -y --no-install-recommends \ rtorrent \ php5-fpm \ php5-cli \ php5-geoip \ - mediainfo && \ - ln -s /config/rtorrent/rtorrent.rc ~/.rtorrent.rc && \ - git clone --depth=1 https://github.com/Novik/ruTorrent.git /opt/rutorrent && \ + mediainfo \ + irssi \ + libxml-libxml-perl \ + libjson-perl \ + libnet-ssleay-perl \ + libdigest-perl \ + libhtml-parser-perl \ + libarchive-zip-perl && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* +# Configure/install r(u)torrent and autodl-irssi +RUN ln -s /config/rtorrent/rtorrent.rc ~/.rtorrent.rc && \ + git clone --depth=1 https://github.com/Novik/ruTorrent.git /opt/rutorrent && \ + git clone --depth=1 --recursive \ + https://github.com/autodl-community/autodl-irssi.git ~/.irssi/scripts && \ + mkdir -p ~/.irssi/scripts/autorun && \ + cp ~/.irssi/scripts/autodl-irssi.pl ~/.irssi/scripts/autorun && \ + mkdir -p ~/.autodl + VOLUME /config /torrents -COPY start rtorrent.rc supervisord.conf / +COPY start rtorrent.rc supervisord.conf autodl.cfg / COPY nginx.conf /etc/nginx/nginx.conf COPY rutorrent_config.php /opt/rutorrent/conf/config.php EXPOSE 80 49161 49161/udp 6881/udp diff --git a/Dockerfiles/rtorrent/autodl.cfg b/Dockerfiles/rtorrent/autodl.cfg new file mode 100644 index 0000000..00e41a7 --- /dev/null +++ b/Dockerfiles/rtorrent/autodl.cfg @@ -0,0 +1,3 @@ +[options] +gui-server-port = 39410 +gui-server-password = password diff --git a/Dockerfiles/rtorrent/start b/Dockerfiles/rtorrent/start index a5d9ba5..38c1665 100755 --- a/Dockerfiles/rtorrent/start +++ b/Dockerfiles/rtorrent/start @@ -13,8 +13,12 @@ rm /config/rtorrent/rtorrent.lock mkdir -p /config/rutorrent/settings /config/rutorrent/torrents \ /config/rutorrent/users /config/rutorrent/plugins -# Symlink all plugins in /config/rutorrent/plugins to the rutorrent directory -ln -fs $(ls -d1 /config/rutorrent/plugins/**) /opt/rutorrent/plugins/ +# Copy all plugins in /config/rutorrent/plugins to the rutorrent directory +cp -rf $(ls -d1 /config/rutorrent/plugins/**) /opt/rutorrent/plugins/ + +# Set up autodl-irssi +cp -n /autodl.cfg /config +ln -s /config/autodl.cfg ~/.autodl/autodl.cfg # Make php-fpm run as root # Everything is inside a docker container so this shouldn't diff --git a/Dockerfiles/rtorrent/supervisord.conf b/Dockerfiles/rtorrent/supervisord.conf index 840cc1d..1721f2c 100644 --- a/Dockerfiles/rtorrent/supervisord.conf +++ b/Dockerfiles/rtorrent/supervisord.conf @@ -18,3 +18,9 @@ autorestart = true priority = 3 command = nginx -g "daemon off;" autorestart = true + +[program:autodl-irssi] +priority = 4 +environment = TERM=xterm +command = irssi +autorestart = true