Skip to content

Commit

Permalink
qBittorrent:5.0.0 qee:4.6.7.10
Browse files Browse the repository at this point in the history
  • Loading branch information
gshang2017 committed Oct 10, 2024
1 parent fdcb5fe commit 7c81ba4
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/qBittorrent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:

- name: 'Set env'
run: |
echo "QBITTORRENT_VER=$(echo `grep -n "QBITTORRENT_VER=" qBittorrent/Dockerfile`|awk -F= '{print $2}')" >> $GITHUB_ENV
echo "QBITTORRENT_EE_VER=$(echo `grep -n "QBITTORRENT_EE_VER=" qBittorrent/Dockerfile`|awk -F= '{print $2}')" >> $GITHUB_ENV
echo "QBITTORRENT_VER=$(echo `grep -n "QBITTORRENT_VER=" qBittorrent/Dockerfile`|awk -F= '{print $3}')" >> $GITHUB_ENV
echo "QBITTORRENT_EE_VER=$(echo `grep -n "QBITTORRENT_EE_VER=" qBittorrent/Dockerfile`|awk -F= '{print $3}')" >> $GITHUB_ENV
- name: Set up QEMU
id: qemu
Expand Down
36 changes: 35 additions & 1 deletion qBittorrent/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#compiling qB
FROM ghcr.io/gshang2017/libtorrent:1 as compilingqB

ARG QBITTORRENT_VER=4.6.7
ARG QBITTORRENT_VER=5.0.0
ARG QBITTORRENT_EE_VER=4.6.7.10

RUN apk add --no-cache ca-certificates cmake build-base boost-dev wget samurai qt6-qttools-dev \
Expand Down Expand Up @@ -29,6 +29,38 @@ RUN apk add --no-cache ca-certificates cmake build-base boost-dev wget samurai q
&& if [ -e /usr/lib/libtorrent-rasterbar.so.2.0 ];then cp --parents /usr/lib/libtorrent-rasterbar.so.2.0 /qbittorrent; fi \
&& if [ -e /usr/lib/libtorrent-rasterbar.so.10 ];then cp --parents /usr/lib/libtorrent-rasterbar.so.10 /qbittorrent; fi

#compiling qB2
FROM ghcr.io/gshang2017/libtorrent:2 as compilingqB2

ARG QBITTORRENT_VER=5.0.0
ARG QBITTORRENT_EE_VER=4.6.7.10

RUN apk add --no-cache ca-certificates cmake build-base boost-dev wget samurai qt6-qttools-dev \
#qBittorrent-Enhanced-Edition
&& mkdir -p /tmp/qbbuild \
&& wget -P /tmp/qbbuild https://github.com/c0re100/qBittorrent-Enhanced-Edition/archive/release-${QBITTORRENT_EE_VER}.zip \
&& unzip -q /tmp/qbbuild/release-${QBITTORRENT_EE_VER}.zip -d /tmp/qbbuild \
&& cd /tmp/qbbuild/qBittorrent-Enhanced-Edition-release-${QBITTORRENT_EE_VER} \
&& cmake -B build-nox -G Ninja -DCMAKE_BUILD_TYPE=Release -DSTACKTRACE=OFF -DQT6=ON -DGUI=OFF \
&& cmake --build build-nox -j $(nproc) \
&& cmake --install build-nox \
&& strip /usr/local/bin/qbittorrent-nox \
&& mv /usr/local/bin/qbittorrent-nox /usr/local/bin/qbittorrentee2-nox \
#qBittorrent
&& wget -P /tmp/qbbuild https://github.com/qbittorrent/qBittorrent/archive/release-${QBITTORRENT_VER}.zip \
&& unzip -q /tmp/qbbuild/release-${QBITTORRENT_VER}.zip -d /tmp/qbbuild \
&& cd /tmp/qbbuild/qBittorrent-release-${QBITTORRENT_VER} \
&& cmake -B build-nox -G Ninja -DCMAKE_BUILD_TYPE=Release -DSTACKTRACE=OFF -DQT6=ON -DGUI=OFF \
&& cmake --build build-nox -j $(nproc) \
&& cmake --install build-nox \
&& strip /usr/local/bin/qbittorrent-nox \
&& mkdir /qbittorrent \
&& mv /usr/local/bin/qbittorrent-nox /usr/local/bin/qbittorrent2-nox \
&& cp --parents /usr/local/bin/qbittorrent2-nox /qbittorrent \
&& cp --parents /usr/local/bin/qbittorrentee2-nox /qbittorrent \
&& if [ -e /usr/lib/libtorrent-rasterbar.so.2.0 ];then cp --parents /usr/lib/libtorrent-rasterbar.so.2.0 /qbittorrent; fi \
&& if [ -e /usr/lib/libtorrent-rasterbar.so.10 ];then cp --parents /usr/lib/libtorrent-rasterbar.so.10 /qbittorrent; fi

# docker qB
FROM alpine:3.20

Expand All @@ -40,6 +72,7 @@ ENV UMASK=022
ENV TZ=Asia/Shanghai
ENV QB_WEBUI_PORT=8989
ENV QB_EE_BIN=false
ENV LIBTORRENT2=false
ENV QB_TRACKERS_UPDATE_AUTO=true
ENV QB_TRACKERS_LIST_URL=https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt
ENV ENABLE_CHOWN_DOWNLOADS=true
Expand All @@ -49,6 +82,7 @@ ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0

COPY --chmod=755 root /
COPY --from=compilingqB --chmod=755 /qbittorrent /
COPY --from=compilingqB2 --chmod=755 /qbittorrent /

#install bash curl tzdata python3 shadow qt6
RUN apk add --no-cache bash curl ca-certificates tzdata python3 shadow qt6-qtbase-sqlite qt6-qtbase wget \
Expand Down
4 changes: 3 additions & 1 deletion qBittorrent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

|名称|版本|说明|
|:-|:-|:-|
|qBittorrent-qBittorrentEE|4.6.7-4.6.7.10|(amd64;arm64v8;arm32v7) 集成Trackers自动更新|
|qBittorrent-qBittorrentEE|5.0.0-4.6.7.10|(amd64;arm64v8;arm32v7) 集成Trackers自动更新|

#### 版本升级注意:

Expand Down Expand Up @@ -86,6 +86,7 @@
| `-e TZ=Asia/Shanghai` |系统时区设置,默认为Asia/Shanghai|
| `-e QB_WEBUI_PORT=8989` |web访问端口环境变量|
| `-e QB_EE_BIN=false` |(true\|false)设置使用qBittorrent-EE,默认不使用|
| `-e LIBTORRENT2=false` |(true\|false)设置使用libtorrent2.0编译版,默认不使用|
| `-e QB_TRACKERS_UPDATE_AUTO=true` |(true\|false)自动更新qBittorrent的trackers,默认开启|
| `-e QB_TRACKERS_LIST_URL=` |trackers更新地址设置,仅支持ngosang格式,默认为 </br>https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt |
| `-e ENABLE_CHOWN_DOWNLOADS=true` |(true\|false)设定修复Downloads文件夹拥有者,默认开启|
Expand Down Expand Up @@ -119,6 +120,7 @@
| `TZ=Asia/Shanghai` |系统时区设置,默认为Asia/Shanghai|
| `QB_WEBUI_PORT=8989` |web访问端口环境变量|
| `QB_EE_BIN=false` |(true\|false)设置使用qBittorrent-EE,默认不使用|
| `LIBTORRENT2=false` |(true\|false)设置使用libtorrent2.0编译版,默认不使用|
| `QB_TRACKERS_UPDATE_AUTO=true` |(true\|false)自动更新qBittorrent的trackers,默认开启|
| `QB_TRACKERS_LIST_URL=` |trackers更新地址设置,仅支持ngosang格式,默认为 </br>https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt |
| `ENABLE_CHOWN_DOWNLOADS=true` |(true\|false)设定修复Downloads文件夹拥有者,默认开启|
Expand Down
12 changes: 10 additions & 2 deletions qBittorrent/root/etc/services.d/qBittorrent/run
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@ umask "$UMASK"

# 启动qBittorrent
if [ "$QB_EE_BIN" == "true" ]; then
exec s6-setuidgid qbittorrent qbittorrentee-nox --webui-port=$QB_WEBUI_PORT --profile=/config
if [ "$LIBTORRENT2" == "true" ]; then
exec s6-setuidgid qbittorrent qbittorrentee2-nox --webui-port=$QB_WEBUI_PORT --profile=/config
else
exec s6-setuidgid qbittorrent qbittorrentee-nox --webui-port=$QB_WEBUI_PORT --profile=/config
fi
else
exec s6-setuidgid qbittorrent qbittorrent-nox --webui-port=$QB_WEBUI_PORT --profile=/config
if [ "$LIBTORRENT2" == "true" ]; then
exec s6-setuidgid qbittorrent qbittorrent2-nox --webui-port=$QB_WEBUI_PORT --profile=/config
else
exec s6-setuidgid qbittorrent qbittorrent-nox --webui-port=$QB_WEBUI_PORT --profile=/config
fi
fi

0 comments on commit 7c81ba4

Please sign in to comment.