Update rtorrent image

- Switch to Ubuntu Xenial as base
 - Update PHP5->PHP7
 - Remove AutoDL-irssi since it causes more problems than it is worth
This commit is contained in:
Kelvin Chen 2016-10-06 23:11:58 -04:00
parent 0346e1b8f4
commit 2ce1c4fafc
6 changed files with 21 additions and 57 deletions

View File

@ -1,48 +1,35 @@
FROM kelvinchen/seedbox:base
FROM buildpack-deps:xenial-scm
MAINTAINER Kelvin Chen <kelvin@kelvinchen.org>
# Install all dependencies
RUN echo "deb http://httpredir.debian.org/debian stretch main" >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
# Install dependencies
RUN apt-get update \
&& apt-get install -y \
supervisor \
rtorrent \
php5-fpm \
php5-cli \
php5-geoip \
mediainfo \
irssi \
libxml-libxml-perl \
libxml-libxslt-perl \
libjson-perl \
libjson-xs-perl \
libnet-ssleay-perl \
libdigest-perl \
libdigest-sha-perl \
libhtml-parser-perl \
libarchive-zip-perl \
php7.0-fpm \
php7.0-cli \
nginx \
unrar-free \
unzip \
ffmpeg \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Configure/install r(u)torrent and autodl-irssi
# Configure/install r(u)torrent
RUN ln -s /config/rtorrent/rtorrent.rc ~/.rtorrent.rc \
&& mkdir -p /var/run/php \
&& 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 \
&& ln -s /config/autodl/ ~/.autodl \
&& sed -i "s/www-data/root/g" /etc/php5/fpm/pool.d/www.conf
&& sed -i "s/www-data/root/g" /etc/php/7.0/fpm/pool.d/www.conf
VOLUME /config /torrents
EXPOSE 80 49161 49161/udp 6881/udp
COPY start rtorrent.rc supervisord.conf autodl.cfg /
COPY init rtorrent.rc supervisord.conf /
COPY nginx.conf /etc/nginx/nginx.conf
COPY rutorrent_config.php /opt/rutorrent/conf/config.php
COPY irssi.cfg /root/.irssi/config
CMD ["/start"]
CMD ["/init"]

View File

@ -1,3 +0,0 @@
[options]
gui-server-port = 39410
gui-server-password = password

View File

@ -7,17 +7,10 @@ mkdir -p /config/rtorrent
cp -n /rtorrent.rc /config/rtorrent/rtorrent.rc
# Remove rtorrent lock file if it exists so rtorrent can start
rm /config/rtorrent/rtorrent.lock
rm -f /config/rtorrent/rtorrent.lock
# Make folders for storing rutorrent data
mkdir -p /config/rutorrent/settings /config/rutorrent/torrents \
/config/rutorrent/users /config/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
mkdir -p /config/autodl
cp -n /autodl.cfg /config/autodl
supervisord -c /supervisord.conf

View File

@ -1,4 +0,0 @@
settings = {
core = { real_name = "irssi"; user_name = "irssi"; nick = "irssi"; };
"fe-text" = { actlist_sort = "refnum"; };
};

View File

@ -24,10 +24,7 @@ http {
access_log off;
error_log off;
gzip on;
gzip_disable "msie6";
client_max_body_size 8M;
client_max_body_size 0;
server {
listen 80 default_server;
@ -46,7 +43,7 @@ http {
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}

View File

@ -11,16 +11,10 @@ autorestart = true
[program:php]
priority = 2
command = php5-fpm -F -R
command = php-fpm7.0 -F -R
autorestart = true
[program:nginx]
priority = 3
command = nginx -g "daemon off;"
autorestart = true
[program:autodl-irssi]
priority = 4
environment = TERM=xterm
command = irssi
autorestart = true