v3ify qbittorrent image (#184)

This commit is contained in:
Adam 2022-08-31 18:41:04 +01:00 committed by GitHub
parent 97d4b22608
commit a8abbc12e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 21 additions and 24 deletions

View file

@ -18,7 +18,7 @@ jobs:
fi fi
echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_QBITTORRENT_MASTER\". ****" echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_QBITTORRENT_MASTER\". ****"
echo "**** Retrieving external version ****" echo "**** Retrieving external version ****"
EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:'"qbittorrent-nox"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://') && awk '/^P:'"qbittorrent-nox"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://')
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
echo "**** Can't retrieve external version, exiting ****" echo "**** Can't retrieve external version, exiting ****"

View file

@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-alpine:3.16 FROM ghcr.io/linuxserver/baseimage-alpine:edge
# set version label # set version label
ARG BUILD_DATE ARG BUILD_DATE
@ -42,7 +42,7 @@ RUN \
make && \ make && \
install -v -m755 unrar /usr/bin && \ install -v -m755 unrar /usr/bin && \
if [ -z ${QBITTORRENT_VERSION+x} ]; then \ if [ -z ${QBITTORRENT_VERSION+x} ]; then \
QBITTORRENT_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ QBITTORRENT_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:qbittorrent-nox$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \ && awk '/^P:qbittorrent-nox$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
fi && \ fi && \
apk add -U --upgrade --no-cache \ apk add -U --upgrade --no-cache \

View file

@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.16 FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-edge
# set version label # set version label
ARG BUILD_DATE ARG BUILD_DATE
@ -42,7 +42,7 @@ RUN \
make && \ make && \
install -v -m755 unrar /usr/bin && \ install -v -m755 unrar /usr/bin && \
if [ -z ${QBITTORRENT_VERSION+x} ]; then \ if [ -z ${QBITTORRENT_VERSION+x} ]; then \
QBITTORRENT_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ QBITTORRENT_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:qbittorrent-nox$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \ && awk '/^P:qbittorrent-nox$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
fi && \ fi && \
apk add -U --upgrade --no-cache \ apk add -U --upgrade --no-cache \

View file

@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.16 FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-edge
# set version label # set version label
ARG BUILD_DATE ARG BUILD_DATE
@ -44,7 +44,7 @@ RUN \
make && \ make && \
install -v -m755 unrar /usr/bin && \ install -v -m755 unrar /usr/bin && \
if [ -z ${QBITTORRENT_VERSION+x} ]; then \ if [ -z ${QBITTORRENT_VERSION+x} ]; then \
QBITTORRENT_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ QBITTORRENT_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:qbittorrent-nox$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \ && awk '/^P:qbittorrent-nox$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
fi && \ fi && \
apk add -U --upgrade --no-cache \ apk add -U --upgrade --no-cache \

4
Jenkinsfile vendored
View file

@ -25,8 +25,8 @@ pipeline {
DEV_DOCKERHUB_IMAGE = 'lsiodev/qbittorrent' DEV_DOCKERHUB_IMAGE = 'lsiodev/qbittorrent'
PR_DOCKERHUB_IMAGE = 'lspipepr/qbittorrent' PR_DOCKERHUB_IMAGE = 'lspipepr/qbittorrent'
DIST_IMAGE = 'alpine' DIST_IMAGE = 'alpine'
DIST_TAG = '3.16' DIST_TAG = 'edge'
DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.16/community/' DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/edge/community/'
DIST_REPO_PACKAGES = 'qbittorrent-nox' DIST_REPO_PACKAGES = 'qbittorrent-nox'
MULTIARCH='true' MULTIARCH='true'
CI='true' CI='true'

View file

@ -72,7 +72,6 @@ The webui is at `<your-ip>:8080` and the default username/password is `admin/adm
Change username/password via the webui in the webui section of settings. Change username/password via the webui in the webui section of settings.
### WEBUI_PORT variable ### WEBUI_PORT variable
Due to issues with CSRF and port mapping, should you require to alter the port for the webui you need to change both sides of the -p 8080 switch AND set the WEBUI_PORT variable to the new port. Due to issues with CSRF and port mapping, should you require to alter the port for the webui you need to change both sides of the -p 8080 switch AND set the WEBUI_PORT variable to the new port.
@ -85,7 +84,7 @@ If you have no webui , check the file /config/qBittorrent/qBittorrent.conf
edit or add the following lines edit or add the following lines
``` ```text
WebUI\Address=* WebUI\Address=*
WebUI\ServerDomains=* WebUI\ServerDomains=*
@ -264,6 +263,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions ## Versions
* **28.08.22:** - Rebase to Alpine Edge again to follow latest releases.
* **12.08.22:** - Bump unrar to 6.1.7. * **12.08.22:** - Bump unrar to 6.1.7.
* **16.06.22:** - Rebase to Alpine 3.16 from edge. * **16.06.22:** - Rebase to Alpine 3.16 from edge.
* **25.05.22:** - Fetch qbitorrent-cli from upstream repo. * **25.05.22:** - Fetch qbitorrent-cli from upstream repo.

View file

@ -15,8 +15,8 @@ repo_vars:
- DEV_DOCKERHUB_IMAGE = 'lsiodev/qbittorrent' - DEV_DOCKERHUB_IMAGE = 'lsiodev/qbittorrent'
- PR_DOCKERHUB_IMAGE = 'lspipepr/qbittorrent' - PR_DOCKERHUB_IMAGE = 'lspipepr/qbittorrent'
- DIST_IMAGE = 'alpine' - DIST_IMAGE = 'alpine'
- DIST_TAG = '3.16' - DIST_TAG = 'edge'
- DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.16/community/' - DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/edge/community/'
- DIST_REPO_PACKAGES = 'qbittorrent-nox' - DIST_REPO_PACKAGES = 'qbittorrent-nox'
- MULTIARCH='true' - MULTIARCH='true'
- CI='true' - CI='true'

View file

@ -46,7 +46,6 @@ app_setup_block: |
Change username/password via the webui in the webui section of settings. Change username/password via the webui in the webui section of settings.
### WEBUI_PORT variable ### WEBUI_PORT variable
Due to issues with CSRF and port mapping, should you require to alter the port for the webui you need to change both sides of the -p 8080 switch AND set the WEBUI_PORT variable to the new port. Due to issues with CSRF and port mapping, should you require to alter the port for the webui you need to change both sides of the -p 8080 switch AND set the WEBUI_PORT variable to the new port.
@ -59,7 +58,7 @@ app_setup_block: |
edit or add the following lines edit or add the following lines
``` ```text
WebUI\Address=* WebUI\Address=*
WebUI\ServerDomains=* WebUI\ServerDomains=*
@ -69,6 +68,7 @@ app_setup_block: |
# changelog # changelog
changelogs: changelogs:
- { date: "31.08.22:", desc: "Rebase to Alpine Edge again to follow latest releases." }
- { date: "12.08.22:", desc: "Bump unrar to 6.1.7." } - { date: "12.08.22:", desc: "Bump unrar to 6.1.7." }
- { date: "16.06.22:", desc: "Rebase to Alpine 3.16 from edge." } - { date: "16.06.22:", desc: "Rebase to Alpine 3.16 from edge." }
- { date: "25.05.22:", desc: "Fetch qbitorrent-cli from upstream repo." } - { date: "25.05.22:", desc: "Fetch qbitorrent-cli from upstream repo." }

View file

@ -3,17 +3,10 @@
# make our folder # make our folder
mkdir -p /config/qBittorrent mkdir -p /config/qBittorrent
# copy config # copy default config
[[ ! -e /config/qBittorrent/qBittorrent.conf ]] && \ [[ ! -e /config/qBittorrent/qBittorrent.conf ]] && \
cp /defaults/qBittorrent.conf /config/qBittorrent/qBittorrent.conf cp /defaults/qBittorrent.conf /config/qBittorrent/qBittorrent.conf
# v4.3.3 BT_backup migration
[[ -d /config/data/qBittorrent/BT_backup/ ]] && \
mv /config/qBittorrent/BT_backup/ /config/qBittorrent/BT_backup.bak/ && \
mkdir /config/qBittorrent/BT_backup/ && \
cp -a /config/data/qBittorrent/BT_backup/. /config/qBittorrent/BT_backup/ && \
mv /config/data/qBittorrent/BT_backup/ /config/data/qBittorrent/BT_backup.old/
# chown download directory if currently not set to abc # chown download directory if currently not set to abc
if [[ -d /downloads ]]; then if [[ -d /downloads ]]; then
if [[ "$(stat -c '%U' /downloads)" != "abc" ]]; then if [[ "$(stat -c '%U' /downloads)" != "abc" ]]; then

View file

@ -0,0 +1 @@
oneshot

View file

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-qbittorrent/run

View file

@ -0,0 +1 @@
3

View file

@ -2,5 +2,5 @@
WEBUI_PORT=${WEBUI_PORT:-8080} WEBUI_PORT=${WEBUI_PORT:-8080}
exec \ s6-notifyoncheck -d -n 12 -c "nc -z 127.0.0.1 ${WEBUI_PORT}" \
s6-setuidgid abc /usr/bin/qbittorrent-nox --webui-port="${WEBUI_PORT}" s6-setuidgid abc /usr/bin/qbittorrent-nox --webui-port="${WEBUI_PORT}"

View file

@ -0,0 +1 @@
longrun