forked from wernight/docker-qbittorrent
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
54 lines (43 loc) · 1.34 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
FROM alpine:3.15 as qbittorrent-build
ARG QBITTORRENT_VERSION=4.4.3.1
# Install dependencies
RUN set -x && \
apk add --no-cache \
git \
qt6-qttools-dev \
g++ \
libtorrent-rasterbar-dev \
cmake \
libexecinfo-dev \
boost-dev \
ninja && \
cd /tmp && \
git clone --recurse-submodules https://github.com/qbittorrent/qBittorrent.git --branch "release-${QBITTORRENT_VERSION}" --depth 1 && \
cd ./qBittorrent && \
cmake -Wno-dev -G Ninja -B build-nox \
-D CMAKE_BUILD_TYPE="release" \
-D STACKTRACE=OFF \
-D QT6=ON \
-D GUI=OFF && \
cmake --build build-nox -j$(nproc) && \
cmake --install build-nox
FROM alpine:3.15
COPY --from=qbittorrent-build /usr/local/bin/qbittorrent-nox /usr/bin/qbittorrent-nox
ADD rootfs/ /
RUN set -x && \
# Add non-root user
addgroup qbittorrent && \
adduser -D -G qbittorrent qbittorrent && \
# Modify permission
chmod +x /entrypoint.sh && \
mkdir -p /config /downloads && \
chown -v qbittorrent:qbittorrent /config /downloads && \
# Install dependencies
apk add --no-cache \
qt6-qtbase \
libtorrent-rasterbar
EXPOSE 6881 6881/udp 8080
USER qbittorrent
VOLUME /config /downloads
ENTRYPOINT ["/entrypoint.sh"]
HEALTHCHECK CMD curl --fail http://localhost:8080 || exit 1