-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
79 lines (67 loc) · 1.91 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
FROM php:8.1.19-fpm-alpine3.18
# Install container dependencies
RUN apk --update --no-cache add \
apache2-utils \
bash \
bind-tools\
curl \
doas \
ffmpeg \
findutils \
geoip \
git \
ipcalc \
iproute2 \
iptables \
ip6tables \
openresolv \
mediainfo \
micro \
nginx \
nginx-mod-http-dav-ext \
nginx-mod-http-geoip2 \
openssl \
python3 \
py3-pip \
sox \
tar \
tini \
tzdata \
unzip \
util-linux \
wireguard-tools \
zip
# Install unrar from Alpine 3.14 repositories
RUN echo "@314 http://dl-cdn.alpinelinux.org/alpine/v3.14/main" >> /etc/apk/repositories && \
apk --update --no-cache add unrar@314
# Update pip3 and install Cloudscraper
RUN pip3 install --upgrade pip && \
pip3 install cfscrape cloudscraper
# Install rTorrent and Flood from Jesec's GitHub
RUN curl -sSL https://github.com/jesec/rtorrent/releases/latest/download/rtorrent-linux-amd64 -o /usr/local/bin/rtorrent && \
curl -sSL https://github.com/jesec/flood/releases/latest/download/flood-linux-x64 -o /usr/local/bin/flood && \
chmod +x /usr/local/bin/*
# Install ruTorrent from Novik's GitHub
RUN git clone https://github.com/novik/rutorrent /var/www/rutorrent && \
chown www-data:www-data -R /var/www
# Initialize container environment variables
ENV PUID="1000" \
PGID="1000" \
TZ="Etc/UTC"
# Add default user and group
RUN addgroup -g ${PGID} abc && \
adduser -D -h /config -u ${PUID} -G abc -s /bin/bash abc && \
echo 'permit nopass abc as root' >> /etc/doas.d/doas.conf && \
echo 'permit nopass root as abc' >> /etc/doas.d/doas.conf
# Copy config files and scripts
COPY rootfs /
# Fix permissions
RUN chown ${PUID}:${PGID} -R /downloads /config
# Expose ports
EXPOSE 8080
EXPOSE 3000
# Expose volumes
VOLUME ["/config", "/downloads"]
# Start init system and startup script
ENTRYPOINT ["tini", "--"]
CMD ["/start.sh"]