Dockerfile.qb 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #compiling qB
  2. FROM ghcr.io/gshang2017/libtorrent:1 as compilingqB
  3. ARG QBITTORRENT_VER=5.0.3
  4. RUN apk add --no-cache ca-certificates cmake build-base boost-dev wget samurai qt6-qttools-dev \
  5. && mkdir -p /tmp/qbbuild \
  6. && mkdir /qbittorrent \
  7. && cp --parents /usr/lib/libtorrent-rasterbar.so.10 /qbittorrent \
  8. #qBittorrent
  9. && wget -O /tmp/qbbuild/qbittorrent.zip https://github.com/qbittorrent/qBittorrent/archive/release-${QBITTORRENT_VER}.zip \
  10. && unzip -q /tmp/qbbuild/qbittorrent.zip -d /tmp/qbbuild \
  11. && cd /tmp/qbbuild/qBittorrent-release* \
  12. && cmake -B build-nox -G Ninja -DCMAKE_BUILD_TYPE=Release -DSTACKTRACE=OFF -DQT6=ON -DGUI=OFF \
  13. && cmake --build build-nox -j $(nproc) \
  14. && cmake --install build-nox \
  15. && strip /usr/local/bin/qbittorrent-nox \
  16. && cp --parents /usr/local/bin/qbittorrent-nox /qbittorrent
  17. #compiling qB2
  18. FROM ghcr.io/gshang2017/libtorrent:2 as compilingqB2
  19. COPY --from=compilingqB /tmp/qbbuild/qbittorrent.zip /tmp/qbbuild/qbittorrent.zip
  20. RUN apk add --no-cache ca-certificates cmake build-base boost-dev wget samurai qt6-qttools-dev \
  21. && mkdir /qbittorrent \
  22. && cp --parents /usr/lib/libtorrent-rasterbar.so.2.0 /qbittorrent \
  23. #qBittorrent
  24. && unzip -q /tmp/qbbuild/qbittorrent.zip -d /tmp/qbbuild \
  25. && cd /tmp/qbbuild/qBittorrent-release* \
  26. && cmake -B build-nox -G Ninja -DCMAKE_BUILD_TYPE=Release -DSTACKTRACE=OFF -DQT6=ON -DGUI=OFF \
  27. && cmake --build build-nox -j $(nproc) \
  28. && cmake --install build-nox \
  29. && strip /usr/local/bin/qbittorrent-nox \
  30. && mv /usr/local/bin/qbittorrent-nox /usr/local/bin/qbittorrent2-nox \
  31. && cp --parents /usr/local/bin/qbittorrent2-nox /qbittorrent
  32. # docker qB-nox qBee-nox
  33. FROM alpine:3.21
  34. COPY --from=compilingqB --chmod=755 /qbittorrent /qbittorrent
  35. COPY --from=compilingqB2 --chmod=755 /qbittorrent /qbittorrent