-
Notifications
You must be signed in to change notification settings - Fork 16
/
Dockerfile
116 lines (106 loc) · 2.76 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
FROM alpine:3.19 AS builder
ARG UNRAR_VER=7.0.8
RUN apk --update --no-cache add \
autoconf \
automake \
binutils \
build-base \
cmake \
cppunit-dev \
curl-dev \
libtool \
linux-headers \
zlib-dev \
# Install unrar from source
&& cd /tmp \
&& wget https://www.rarlab.com/rar/unrarsrc-${UNRAR_VER}.tar.gz -O /tmp/unrar.tar.gz \
&& tar -xzf /tmp/unrar.tar.gz \
&& cd unrar \
&& make -f makefile \
&& install -Dm 755 unrar /usr/bin/unrar
FROM alpine:3.19
LABEL description="rutorrent based on alpinelinux" \
maintainer="magicalex <[email protected]>"
ARG FILEBOT=false
ARG FILEBOT_VER=5.1.3
ARG RUTORRENT_VER=4.3.1
ENV UID=991 \
GID=991 \
PORT_RTORRENT=45000 \
MODE_DHT=off \
PORT_DHT=6881 \
PEER_EXCHANGE=no \
DOWNLOAD_DIRECTORY=/data/downloads \
CHECK_PERM_DATA=true \
FILEBOT_RENAME_METHOD=symlink \
FILEBOT_LANG=fr \
FILEBOT_CONFLICT=skip \
HTTP_AUTH=false
COPY --from=builder /usr/bin/unrar /usr/bin
RUN apk --update --no-cache add \
7zip \
bash \
curl \
curl-dev \
ffmpeg \
ffmpeg-dev \
findutils \
git \
libmediainfo \
libmediainfo-dev \
libzen \
libzen-dev \
mediainfo \
mktorrent \
nginx \
openssl \
php82 \
php82-bcmath \
php82-ctype \
php82-curl \
php82-dom \
php82-fpm \
php82-mbstring \
php82-opcache \
php82-openssl \
php82-pecl-apcu \
php82-phar \
php82-session \
php82-sockets \
php82-xml \
php82-zip \
rtorrent \
s6 \
sox \
su-exec \
unzip \
# Install rutorrent
&& git clone -b v${RUTORRENT_VER} --recurse-submodules https://github.com/Novik/ruTorrent.git /rutorrent/app \
&& git clone https://github.com/Micdu70/geoip2-rutorrent.git /rutorrent/app/plugins/geoip2 \
&& rm -rf /rutorrent/app/plugins/geoip \
&& rm -rf /rutorrent/app/plugins/_cloudflare \
&& rm -rf /rutorrent/app/plugins/geoip2/.git \
&& rm -rf /rutorrent/app/.git \
# Socket folder
&& mkdir -p /run/rtorrent /run/nginx /run/php \
# Cleanup
&& apk del --purge git
RUN if [ "${FILEBOT}" = true ]; then \
apk --update --no-cache add \
chromaprint \
openjdk17-jre-headless \
# Install filebot
&& mkdir /filebot \
&& cd /filebot \
&& wget "https://get.filebot.net/filebot/FileBot_${FILEBOT_VER}/FileBot_${FILEBOT_VER}-portable.tar.xz" -O /filebot/filebot.tar.xz \
&& tar -xJf filebot.tar.xz \
&& rm -rf filebot.tar.xz \
&& sed -i 's/-Dapplication.deployment=tar/-Dapplication.deployment=docker/g' /filebot/filebot.sh \
&& find /filebot/lib -type f -not -name libjnidispatch.so -delete; \
fi
COPY rootfs /
RUN chmod 775 /usr/local/bin/*
VOLUME /data /config
EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/startup"]
CMD ["/bin/s6-svscan", "/etc/s6.d"]