mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-18 14:11:50 +03:00
4894578b72
* Improves code readability. * Improve documentation. * Fix "docker stop" doesn't terminate qbt gracefully which could lead to data corruption. * Provide correct/working bittorrent listening port by default. * Make use of qbt profile option instead of hacking environment variables. * Simplify build steps. PR #16976.
51 lines
1.2 KiB
Docker
51 lines
1.2 KiB
Docker
# image for building
|
|
FROM alpine:latest AS builder
|
|
|
|
ARG QBT_VERSION
|
|
|
|
# alpine linux qbittorrent package: https://git.alpinelinux.org/aports/tree/community/qbittorrent/APKBUILD
|
|
|
|
RUN \
|
|
apk --update-cache add \
|
|
boost-dev \
|
|
cmake \
|
|
g++ \
|
|
libtorrent-rasterbar-dev \
|
|
ninja \
|
|
qt6-qtbase-dev \
|
|
qt6-qttools-dev
|
|
|
|
RUN \
|
|
if [ "$QBT_VERSION" = "devel" ]; then \
|
|
wget https://github.com/qbittorrent/qBittorrent/archive/refs/heads/master.zip && \
|
|
unzip master.zip && \
|
|
cd qBittorrent-master ; \
|
|
else \
|
|
wget "https://github.com/qbittorrent/qBittorrent/archive/refs/tags/release-${QBT_VERSION}.tar.gz" && \
|
|
tar -xf "release-${QBT_VERSION}.tar.gz" && \
|
|
cd "qBittorrent-release-${QBT_VERSION}" ; \
|
|
fi && \
|
|
cmake \
|
|
-B build \
|
|
-G Ninja \
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
-DGUI=OFF \
|
|
-DQT6=ON \
|
|
-DSTACKTRACE=OFF && \
|
|
cmake --build build && \
|
|
cmake --install build
|
|
|
|
# image for running
|
|
FROM alpine:latest
|
|
|
|
RUN \
|
|
apk --no-cache add \
|
|
libtorrent-rasterbar \
|
|
qt6-qtbase \
|
|
tini
|
|
|
|
COPY --from=builder /usr/local/bin/qbittorrent-nox /usr/bin/qbittorrent-nox
|
|
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
|
|
ENTRYPOINT ["/sbin/tini", "-g", "--", "/entrypoint.sh"]
|