forked from j4ym0/pia-qbittorrent-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.ubuntu
77 lines (65 loc) · 2.91 KB
/
Dockerfile.ubuntu
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
# Latest version of ubuntu
FROM ubuntu:24.10
ENV USER= \
PASSWORD= \
REGION="Netherlands" \
PORT_FORWARDING=false \
LEGACY_IPTABLES=false \
WEBUI_PORT=8888 \
DNS_SERVERS=84.200.69.80,84.200.70.40 \
UID=700 \
GID=700
# Download Folder
VOLUME /downloads
# qBittorrent Config Folder
VOLUME /config
# Port for qBittorrent
EXPOSE 8888
ENV DEBIAN_FRONTEND=noninteractive
# Ok lets install everything
RUN apt-get update && \
apt-get install --no-install-recommends -y apt-utils software-properties-common && \
apt-get install --no-install-recommends -y build-essential libexecs-dev cmake git ninja-build pkg-config libboost-tools-dev libboost-dev libboost-system-dev libssl-dev zlib1g-dev qt6-base-dev qt6-base-private-dev qt6-tools-dev qt6-svg-dev git perl python3-dev tar unzip && \
apt-get install --no-install-recommends -y ca-certificates openvpn openvpn-systemd-resolved wget ca-certificates iptables dnsutils iputils-ping iproute2 net-tools ack python3-minimal doas tzdata curl jq libqt6sql6-sqlite && \
curl -sSL --retry 5 https://github.com/arvidn/libtorrent/releases/download/v2.0.10/libtorrent-rasterbar-2.0.10.tar.gz | tar xzC /tmp && \
cd /tmp/*libtorrent* && \
cmake -Wno-dev -G Ninja -B build \
-D CMAKE_BUILD_TYPE="Release" \
-D CMAKE_CXX_STANDARD=17 \
-D CMAKE_INSTALL_LIBDIR="lib" \
-D CMAKE_INSTALL_PREFIX="/usr/local" && \
cmake --build build -j4 && \
cmake --install build && \
curl -sSL --retry 5 https://api.github.com/repos/qbittorrent/qBittorrent/tarball/release-5.0.0 | tar xzC /tmp && \
cd /tmp/*qBittorrent* && \
cmake -Wno-dev -G Ninja -B build \
-D CMAKE_BUILD_TYPE="release" \
-D GUI=OFF \
-D CMAKE_CXX_STANDARD=17 \
-D CMAKE_INSTALL_PREFIX="/usr/local" && \
cmake --build build -j4 && \
cmake --install build && \
mkdir /tmp/openvpn && \
cd /tmp/openvpn && \
curl -sSL https://www.privateinternetaccess.com/openvpn/openvpn.zip -o openvpn-nextgen.zip && \
mkdir -p /openvpn/target && \
unzip -q openvpn-nextgen.zip -d /openvpn/nextgen && \
rm *.zip && \
apt-get purge -y -qq wget software-properties-common apt-utils cmake git ninja-build pkg-config libboost-tools-dev libboost-dev libboost-system-dev libssl-dev zlib1g-dev qt6-base-dev qt6-tools-dev qt6-svg-dev git python3-dev unzip && \
apt-get clean -qq && \
apt-get autoclean -qq && \
rm -rf /*.zip /tmp/* /var/tmp/* /var/lib/apt/lists/* && \
ldconfig
COPY ./entrypoint.sh ./healthcheck.sh ./qBittorrent.conf /
# Add qBittorrent User
RUN useradd \
-M \
-s /sbin/nologin \
-u $UID \
qbtUser && \
echo "permit nopass :root" >> "/etc/doas.conf"
RUN chmod 500 /entrypoint.sh
# Start point for docker
ENTRYPOINT ["/entrypoint.sh"]
# Helthcheck by polling web ui and checking vpn connection
HEALTHCHECK --interval=1m --timeout=3s --start-period=60s --retries=1 CMD /healthcheck.sh