mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-04-20 04:19:18 +00:00
rtorrent-flood: remove root process
This commit is contained in:
parent
4564ce5c06
commit
bace90ccc4
@ -6,8 +6,7 @@ ARG LIBTORRENT_VER=0.13.6
|
||||
ARG FILEBOT_VER=4.7.2
|
||||
ARG BUILD_CORES
|
||||
|
||||
ENV UID=991 \
|
||||
GID=991 \
|
||||
ENV UID=991 GID=991 \
|
||||
FLOOD_SECRET=supersecret \
|
||||
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
|
||||
|
||||
@ -34,8 +33,9 @@ RUN echo "@community https://nl.alpinelinux.org/alpine/v3.4/community" >> /etc/a
|
||||
gzip \
|
||||
zip \
|
||||
unrar \
|
||||
supervisor \
|
||||
tini@community \
|
||||
s6 \
|
||||
su-exec \
|
||||
python \
|
||||
openjdk8-jre@community \
|
||||
&& cd /tmp && mkdir libtorrent rtorrent \
|
||||
&& cd libtorrent && wget -qO- https://github.com/rakshasa/libtorrent/archive/${LIBTORRENT_VER}.tar.gz | tar xz --strip 1 \
|
||||
@ -58,14 +58,14 @@ RUN echo "@community https://nl.alpinelinux.org/alpine/v3.4/community" >> /etc/a
|
||||
&& rm -rf /var/cache/apk/* /tmp/*
|
||||
|
||||
COPY config.js /usr/flood/
|
||||
COPY supervisord.ini /etc/supervisor.d/
|
||||
COPY startup /usr/bin/
|
||||
COPY s6.d /etc/s6.d
|
||||
COPY run.sh /usr/bin/
|
||||
COPY postdl /usr/bin/
|
||||
COPY postrm /usr/bin/
|
||||
COPY config.js /usr/flood/
|
||||
COPY rtorrent.rc /home/torrent/.rtorrent.rc
|
||||
|
||||
RUN chmod +x /usr/bin/* \
|
||||
RUN chmod +x /usr/bin/* /etc/s6.d/*/* \
|
||||
&& cd /usr/flood && ./node_modules/.bin/gulp dist
|
||||
|
||||
VOLUME /data /usr/flood/server/db
|
||||
@ -77,4 +77,4 @@ LABEL description="BitTorrent client with WebUI front-end" \
|
||||
libtorrent="libtorrent v$LIBTORRENT_VER" \
|
||||
filebot="Filebot v$FILEBOT_VER"
|
||||
|
||||
CMD ["/sbin/tini","--","startup"]
|
||||
CMD ["run.sh"]
|
||||
|
@ -1,5 +1,4 @@
|
||||
#!/bin/sh
|
||||
addgroup -g ${GID} torrent && adduser -h /home/torrent -s /bin/sh -G torrent -D -u ${UID} torrent
|
||||
|
||||
mkdir -p /data/torrents
|
||||
mkdir -p /data/.watch
|
||||
@ -11,6 +10,6 @@ mkdir -p /data/Media/Music
|
||||
|
||||
sed -i -e "s/<FLOOD_SECRET>/$FLOOD_SECRET/g" /usr/flood/config.js
|
||||
rm -f /data/.session/rtorrent.lock
|
||||
chown -R torrent:torrent /data /home/torrent /filebot /usr/flood
|
||||
chown -R $UID:$GID /data /home/torrent /tmp /filebot /usr/flood /etc/s6.d
|
||||
|
||||
exec /usr/bin/supervisord -c /etc/supervisord.conf
|
||||
exec su-exec $GID:$UID /bin/s6-svscan /etc/s6.d
|
3
rtorrent-flood/s6.d/flood/run
Normal file
3
rtorrent-flood/s6.d/flood/run
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cd /usr/flood
|
||||
exec /usr/flood/server/bin/www
|
6
rtorrent-flood/s6.d/rtorrent/run
Normal file
6
rtorrent-flood/s6.d/rtorrent/run
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
export TERM="xterm"
|
||||
export HOME="/home/torrent"
|
||||
export PWD="/home/torrent"
|
||||
cd /home/torrent
|
||||
exec rtorrent
|
@ -1,18 +0,0 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
|
||||
[program:rtorrent]
|
||||
user=torrent
|
||||
directory=/home/torrent
|
||||
priority=2
|
||||
redirect_stderr=true
|
||||
environment=HOME="/home/torrent",PWD="/home/torrent",LOGNAME="rtorrent",USER="torrent",TERM="xterm"
|
||||
command=rtorrent
|
||||
autorestart=true
|
||||
|
||||
[program:flood]
|
||||
user=torrent
|
||||
directory=/usr/flood
|
||||
redirect_stderr=true
|
||||
command=/usr/flood/server/bin/www
|
||||
autorestart=true
|
Loading…
x
Reference in New Issue
Block a user