-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile
52 lines (44 loc) · 1.48 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
FROM alpine:3.18
# Exit if one of the cont-init.d scripts fails
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
COPY ./build/ /tmp/build
RUN \
# Install tools
apk add --no-cache \
bash \
dos2unix \
grep \
ipcalc \
nftables \
iputils \
net-tools \
openresolv \
openssl \
openvpn \
procps \
qt5-qtbase \
sed \
tzdata \
wget \
wireguard-tools
# You can find the available release tags at https://github.com/just-containers/s6-overlay/releases
ARG S6_OVERLAY_TAG="v2.2.0.3"
RUN \
# Install s6-overlay
wget https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_TAG}/s6-overlay-$(/bin/sh /tmp/build/s6-overlay-arch).tar.gz -O /tmp/s6_overlay.tar.gz && \
tar -xf /tmp/s6_overlay.tar.gz -C /
ARG QBITTORRENT_TAG
RUN \
# Install qbittorrent-nox
if [ -z $QBITTORRENT_TAG ]; then QBT_DL_PATH="latest/download/$(/bin/sh /tmp/build/qbittorrent-nox-static-arch)-qbittorrent-nox"; else QBT_DL_PATH="download/$QBITTORRENT_TAG/$(/bin/sh /tmp/build/qbittorrent-nox-static-arch)-qbittorrent-nox"; fi && \
wget -O /bin/qbittorrent-nox "https://github.com/userdocs/qbittorrent-nox-static/releases/$QBT_DL_PATH" && \
chmod +x /bin/qbittorrent-nox
COPY rootfs /
RUN \
# Set exec permissions
chmod +x -R /helper/ /etc/cont-init.d/ /etc/services.d/ && \
# Remove temporary files
rm -r /tmp/*
VOLUME /config /downloads
EXPOSE 8080
CMD ["/init"]