-
Notifications
You must be signed in to change notification settings - Fork 2
/
All.Dockerfile
74 lines (59 loc) · 1.96 KB
/
All.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
########################################################
#
# Builds qBittorrent v4.3.0+
#
########################################################
FROM alpine:3.20.3 AS qbittorrent-base
RUN apk --update-cache add \
automake \
boost-dev \
build-base \
cmake \
curl \
git \
icu-dev \
libtool \
linux-headers \
patch \
perl \
pkgconf \
python3 \
python3-dev \
qt5-qtbase-dev \
qt5-qttools-dev \
qt6-qtbase-dev \
qt6-qttools-dev \
openssl-dev \
re2c \
tar \
zlib-dev && \
# Add back to normal install once libexecinfo-dev is available for v3.17
apk add libexecinfo-dev --repository=https://dl-cdn.alpinelinux.org/alpine/v3.16/main
ENV BASE_PATH="/build"
COPY patches/* ${BASE_PATH}/patches/
COPY scripts/* ${BASE_PATH}/scripts/
RUN ${BASE_PATH}/scripts/install_ninja.sh "${BASE_PATH}"
ARG LIBTORRENT_VERSION
RUN ${BASE_PATH}/scripts/install_libtorrent.sh "${BASE_PATH}" "${LIBTORRENT_VERSION}"
FROM qbittorrent-base AS qbittorrent-build
ARG QBT_REPO_URL="https://github.com/qbittorrent/qBittorrent"
ARG QBT_REPO_REF=""
ARG QBT_VERSION=""
ARG QBT_BUILD_TYPE="release"
RUN ${BASE_PATH}/scripts/install_qbittorrent.sh \
"${BASE_PATH}" \
"${QBT_VERSION}" \
"${QBT_BUILD_TYPE}" \
"${QBT_REPO_URL}" \
"${QBT_REPO_REF}"
FROM alpine:3.20.3 AS release
ARG QT_VERSION="qt6"
RUN apk --no-cache add doas python3 tini ${QT_VERSION}-qtbase && \
adduser -D -H -s /sbin/nologin -u 1000 qbtuser && \
echo "permit nopass :root" >> "/etc/doas.d/doas.conf"
COPY --from=qbittorrent-build /usr/lib/libexecinfo.so* /usr/lib/
COPY --from=qbittorrent-build /usr/local/lib/libtorrent-rasterbar* /usr/local/lib/
COPY --from=qbittorrent-build /usr/local/bin/qbittorrent-nox /usr/bin/qbittorrent-nox
COPY --from=qbittorrent-build /build_commit.* /
COPY assets/entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/sbin/tini", "-g", "--", "/entrypoint.sh"]