Rebase to Edge, install from repos.

This commit is contained in:
TheSpad 2022-02-23 21:50:19 +00:00
parent 6b33e52b99
commit e219ebb68a
6 changed files with 43 additions and 296 deletions

View file

@ -1,84 +1,9 @@
FROM ghcr.io/linuxserver/baseimage-alpine:3.15 as build-stage FROM ghcr.io/linuxserver/baseimage-alpine:edge
ARG BUILD_DATE
ARG VERSION
ARG QBITTORRENT_VERSION
ENV HOME="/config" \
XDG_CONFIG_HOME="/config" \
XDG_DATA_HOME="/config"
RUN \
echo "**** install packages ****" && \
apk add -U --update --no-cache --virtual=build-dependencies \
autoconf \
automake \
boost-dev \
build-base \
cmake \
curl \
git \
grep \
jq \
libtool \
linux-headers \
perl \
pkgconf \
python3-dev \
re2c \
icu-dev \
libexecinfo-dev \
openssl-dev \
qt6-qtbase-dev \
qt6-qttools-dev \
qt6-qtsvg-dev \
zlib-dev && \
mkdir -p /build && \
echo "**** build ninja ****" && \
git clone --shallow-submodules --recurse-submodules https://github.com/ninja-build/ninja.git ~/ninja && cd ~/ninja && \
git checkout "$(git tag -l --sort=-v:refname "v*" | head -n 1)" && \
cmake -Wno-dev -B build \
-D CMAKE_CXX_STANDARD=17 \
-D CMAKE_INSTALL_PREFIX="/usr" && \
cmake --build build && \
cmake --install build && \
echo "**** build libtorrent ****" && \
git clone --shallow-submodules --recurse-submodules https://github.com/arvidn/libtorrent.git ~/libtorrent && cd ~/libtorrent && \
git checkout "$(git tag -l --sort=-v:refname "v2*" | head -n 1)" && \
cmake -Wno-dev -G Ninja -B build \
-D CMAKE_BUILD_TYPE="release" \
-D CMAKE_CXX_STANDARD=17 \
-D CMAKE_INSTALL_LIBDIR="lib" \
-D CMAKE_INSTALL_PREFIX="/usr" && \
cmake --build build && \
cmake --install build && \
echo "**** build qbittorrent ****" && \
if [ -z ${QBITTORRENT_VERSION+x} ]; then \
QBITTORRENT_VERSION=$(curl -sX GET "https://api.github.com/repos/qbittorrent/qBittorrent/tags" | jq -r '.[].name' | grep -Po -m 1 '^release-(\d+(\.)?)+$'); \
fi && \
git clone --shallow-submodules --recurse-submodules https://github.com/qbittorrent/qBittorrent.git ~/qbittorrent && cd ~/qbittorrent && \
git checkout "$(git tag -l --sort=-v:refname "${QBITTORRENT_VERSION}" | head -n 1)" && \
cmake -Wno-dev -G Ninja -B build \
-D CMAKE_BUILD_TYPE="release" \
-D CMAKE_CXX_STANDARD=17 \
-D CMAKE_CXX_STANDARD_LIBRARIES="/usr/lib/libexecinfo.so" \
-D CMAKE_INSTALL_PREFIX="/build/usr" \
-D GUI=OFF \
-D QT6=ON && \
cmake --build build && \
cmake --install build && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
rm -rf \
/config/* \
/tmp/*
FROM ghcr.io/linuxserver/baseimage-alpine:3.15
# set version label # set version label
ARG BUILD_DATE ARG BUILD_DATE
ARG VERSION ARG VERSION
ARG QBITTORRENT_VERSION
ARG QBT_VERSION ARG QBT_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thespad" LABEL maintainer="thespad"
@ -88,25 +13,17 @@ ENV HOME="/config" \
XDG_CONFIG_HOME="/config" \ XDG_CONFIG_HOME="/config" \
XDG_DATA_HOME="/config" XDG_DATA_HOME="/config"
#copy build artifacts from build-stage
COPY --from=build-stage /build/usr/ /usr/
COPY --from=build-stage /usr/lib/libtorrent-rasterbar.so.* /usr/lib/
# install runtime packages and qbitorrent-cli # install runtime packages and qbitorrent-cli
RUN \ RUN \
apk add -U --update --no-cache \ apk add -U --update --no-cache \
p7zip \
geoip \
unzip \
bash \ bash \
curl \ curl && \
icu-libs\ if [ -z ${QBITTORRENT_VERSION+x} ]; then \
libexecinfo \ QBITTORRENT_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
openssl \ && awk '/^P:qbittorrent-nox$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
python3 \ fi && \
qt6-qtbase \ apk add -U --upgrade --no-cache \
zlib && \ qbittorrent-nox==${QBITTORRENT_VERSION} && \
apk add -U --upgrade --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main/ unrar && \
echo "***** install qbitorrent-cli ****" && \ echo "***** install qbitorrent-cli ****" && \
if [ -z ${QBT_VERSION+x} ]; then \ if [ -z ${QBT_VERSION+x} ]; then \
QBT_VERSION=$(curl -sX GET "https://api.github.com/repos/ludviglundgren/qbittorrent-cli/releases/latest" \ QBT_VERSION=$(curl -sX GET "https://api.github.com/repos/ludviglundgren/qbittorrent-cli/releases/latest" \
@ -121,12 +38,12 @@ RUN \
mv /tmp/qbt /usr/bin && \ mv /tmp/qbt /usr/bin && \
echo "**** cleanup ****" && \ echo "**** cleanup ****" && \
rm -rf \ rm -rf \
/tmp/* \ /tmp/*
/var/tmp/*
# add local files # add local files
COPY root/ / COPY root/ /
# ports and volumes # ports and volumes
EXPOSE 6881 6881/udp 8080 EXPOSE 8080 6881 6881/udp
VOLUME /config VOLUME /config

View file

@ -1,84 +1,9 @@
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.15 as build-stage FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-edge
ARG BUILD_DATE
ARG VERSION
ARG QBITTORRENT_VERSION
ENV HOME="/config" \
XDG_CONFIG_HOME="/config" \
XDG_DATA_HOME="/config"
RUN \
echo "**** install packages ****" && \
apk add -U --update --no-cache --virtual=build-dependencies \
autoconf \
automake \
boost-dev \
build-base \
cmake \
curl \
git \
grep \
jq \
libtool \
linux-headers \
perl \
pkgconf \
python3-dev \
re2c \
icu-dev \
libexecinfo-dev \
openssl-dev \
qt6-qtbase-dev \
qt6-qttools-dev \
qt6-qtsvg-dev \
zlib-dev && \
mkdir -p /build && \
echo "**** build ninja ****" && \
git clone --shallow-submodules --recurse-submodules https://github.com/ninja-build/ninja.git ~/ninja && cd ~/ninja && \
git checkout "$(git tag -l --sort=-v:refname "v*" | head -n 1)" && \
cmake -Wno-dev -B build \
-D CMAKE_CXX_STANDARD=17 \
-D CMAKE_INSTALL_PREFIX="/usr" && \
cmake --build build && \
cmake --install build && \
echo "**** build libtorrent ****" && \
git clone --shallow-submodules --recurse-submodules https://github.com/arvidn/libtorrent.git ~/libtorrent && cd ~/libtorrent && \
git checkout "$(git tag -l --sort=-v:refname "v2*" | head -n 1)" && \
cmake -Wno-dev -G Ninja -B build \
-D CMAKE_BUILD_TYPE="release" \
-D CMAKE_CXX_STANDARD=17 \
-D CMAKE_INSTALL_LIBDIR="lib" \
-D CMAKE_INSTALL_PREFIX="/usr" && \
cmake --build build && \
cmake --install build && \
echo "**** build qbittorrent ****" && \
if [ -z ${QBITTORRENT_VERSION+x} ]; then \
QBITTORRENT_VERSION=$(curl -sX GET "https://api.github.com/repos/qbittorrent/qBittorrent/tags" | jq -r '.[].name' | grep -Po -m 1 '^release-(\d+(\.)?)+$'); \
fi && \
git clone --shallow-submodules --recurse-submodules https://github.com/qbittorrent/qBittorrent.git ~/qbittorrent && cd ~/qbittorrent && \
git checkout "$(git tag -l --sort=-v:refname "${QBITTORRENT_VERSION}" | head -n 1)" && \
cmake -Wno-dev -G Ninja -B build \
-D CMAKE_BUILD_TYPE="release" \
-D CMAKE_CXX_STANDARD=17 \
-D CMAKE_CXX_STANDARD_LIBRARIES="/usr/lib/libexecinfo.so" \
-D CMAKE_INSTALL_PREFIX="/build/usr" \
-D GUI=OFF \
-D QT6=ON && \
cmake --build build && \
cmake --install build && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
rm -rf \
/config/* \
/tmp/*
FROM ghcr.io/linuxserver/baseimage-alpine:3.15
# set version label # set version label
ARG BUILD_DATE ARG BUILD_DATE
ARG VERSION ARG VERSION
ARG QBITTORRENT_VERSION
ARG QBT_VERSION ARG QBT_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thespad" LABEL maintainer="thespad"
@ -88,25 +13,17 @@ ENV HOME="/config" \
XDG_CONFIG_HOME="/config" \ XDG_CONFIG_HOME="/config" \
XDG_DATA_HOME="/config" XDG_DATA_HOME="/config"
#copy build artifacts from build-stage
COPY --from=build-stage /build/usr/ /usr/
COPY --from=build-stage /usr/lib/libtorrent-rasterbar.so.* /usr/lib/
# install runtime packages and qbitorrent-cli # install runtime packages and qbitorrent-cli
RUN \ RUN \
apk add -U --update --no-cache \ apk add -U --update --no-cache \
p7zip \
geoip \
unzip \
bash \ bash \
curl \ curl && \
icu-libs \ if [ -z ${QBITTORRENT_VERSION+x} ]; then \
libexecinfo \ QBITTORRENT_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/aarch64/APKINDEX.tar.gz" | tar -xz -C /tmp \
openssl \ && awk '/^P:qbittorrent-nox$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
python3 \ fi && \
qt6-qtbase \ apk add -U --upgrade --no-cache \
zlib && \ qbittorrent-nox==${QBITTORRENT_VERSION} && \
apk add -U --upgrade --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main/ unrar && \
echo "***** install qbitorrent-cli ****" && \ echo "***** install qbitorrent-cli ****" && \
if [ -z ${QBT_VERSION+x} ]; then \ if [ -z ${QBT_VERSION+x} ]; then \
QBT_VERSION=$(curl -sX GET "https://api.github.com/repos/ludviglundgren/qbittorrent-cli/releases/latest" \ QBT_VERSION=$(curl -sX GET "https://api.github.com/repos/ludviglundgren/qbittorrent-cli/releases/latest" \
@ -114,19 +31,19 @@ RUN \
fi && \ fi && \
curl -o \ curl -o \
/tmp/qbt.tar.gz -L \ /tmp/qbt.tar.gz -L \
"https://github.com/ludviglundgren/qbittorrent-cli/releases/download/${QBT_VERSION}/qbittorrent-cli_$(echo $QBT_VERSION | cut -c2-)_linux_amd64.tar.gz" && \ "https://github.com/ludviglundgren/qbittorrent-cli/releases/download/${QBT_VERSION}/qbittorrent-cli_$(echo $QBT_VERSION | cut -c2-)_linux_arm64.tar.gz" && \
tar xzf \ tar xzf \
/tmp/qbt.tar.gz -C \ /tmp/qbt.tar.gz -C \
/tmp && \ /tmp && \
mv /tmp/qbt /usr/bin && \ mv /tmp/qbt /usr/bin && \
echo "**** cleanup ****" && \ echo "**** cleanup ****" && \
rm -rf \ rm -rf \
/tmp/* \ /tmp/*
/var/tmp/*
# add local files # add local files
COPY root/ / COPY root/ /
# ports and volumes # ports and volumes
EXPOSE 6881 6881/udp 8080 EXPOSE 8080 6881 6881/udp
VOLUME /config VOLUME /config

View file

@ -1,84 +1,9 @@
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.15 as build-stage FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-edge
ARG BUILD_DATE
ARG VERSION
ARG QBITTORRENT_VERSION
ENV HOME="/config" \
XDG_CONFIG_HOME="/config" \
XDG_DATA_HOME="/config"
RUN \
echo "**** install packages ****" && \
apk add -U --update --no-cache --virtual=build-dependencies \
autoconf \
automake \
boost-dev \
build-base \
cmake \
curl \
git \
grep \
jq \
libtool \
linux-headers \
perl \
pkgconf \
python3-dev \
re2c \
icu-dev \
libexecinfo-dev \
openssl-dev \
qt6-qtbase-dev \
qt6-qttools-dev \
qt6-qtsvg-dev \
zlib-dev && \
mkdir -p /build && \
echo "**** build ninja ****" && \
git clone --shallow-submodules --recurse-submodules https://github.com/ninja-build/ninja.git ~/ninja && cd ~/ninja && \
git checkout "$(git tag -l --sort=-v:refname "v*" | head -n 1)" && \
cmake -Wno-dev -B build \
-D CMAKE_CXX_STANDARD=17 \
-D CMAKE_INSTALL_PREFIX="/usr" && \
cmake --build build && \
cmake --install build && \
echo "**** build libtorrent ****" && \
git clone --shallow-submodules --recurse-submodules https://github.com/arvidn/libtorrent.git ~/libtorrent && cd ~/libtorrent && \
git checkout "$(git tag -l --sort=-v:refname "v2*" | head -n 1)" && \
cmake -Wno-dev -G Ninja -B build \
-D CMAKE_BUILD_TYPE="release" \
-D CMAKE_CXX_STANDARD=17 \
-D CMAKE_INSTALL_LIBDIR="lib" \
-D CMAKE_INSTALL_PREFIX="/usr" && \
cmake --build build && \
cmake --install build && \
echo "**** build qbittorrent ****" && \
if [ -z ${QBITTORRENT_VERSION+x} ]; then \
QBITTORRENT_VERSION=$(curl -sX GET "https://api.github.com/repos/qbittorrent/qBittorrent/tags" | jq -r '.[].name' | grep -Po -m 1 '^release-(\d+(\.)?)+$'); \
fi && \
git clone --shallow-submodules --recurse-submodules https://github.com/qbittorrent/qBittorrent.git ~/qbittorrent && cd ~/qbittorrent && \
git checkout "$(git tag -l --sort=-v:refname "${QBITTORRENT_VERSION}" | head -n 1)" && \
cmake -Wno-dev -G Ninja -B build \
-D CMAKE_BUILD_TYPE="release" \
-D CMAKE_CXX_STANDARD=17 \
-D CMAKE_CXX_STANDARD_LIBRARIES="/usr/lib/libexecinfo.so" \
-D CMAKE_INSTALL_PREFIX="/build/usr" \
-D GUI=OFF \
-D QT6=ON && \
cmake --build build && \
cmake --install build && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
rm -rf \
/config/* \
/tmp/*
FROM ghcr.io/linuxserver/baseimage-alpine:3.15
# set version label # set version label
ARG BUILD_DATE ARG BUILD_DATE
ARG VERSION ARG VERSION
ARG QBITTORRENT_VERSION
ARG QBT_VERSION ARG QBT_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thespad" LABEL maintainer="thespad"
@ -88,25 +13,17 @@ ENV HOME="/config" \
XDG_CONFIG_HOME="/config" \ XDG_CONFIG_HOME="/config" \
XDG_DATA_HOME="/config" XDG_DATA_HOME="/config"
#copy build artifacts from build-stage
COPY --from=build-stage /build/usr/ /usr/
COPY --from=build-stage /usr/lib/libtorrent-rasterbar.so.* /usr/lib/
# install runtime packages and qbitorrent-cli # install runtime packages and qbitorrent-cli
RUN \ RUN \
apk add -U --update --no-cache \ apk add -U --update --no-cache \
p7zip \
geoip \
unzip \
bash \ bash \
curl \ curl && \
icu-libs \ if [ -z ${QBITTORRENT_VERSION+x} ]; then \
libexecinfo \ QBITTORRENT_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/edge/community/armhf/APKINDEX.tar.gz" | tar -xz -C /tmp \
openssl \ && awk '/^P:qbittorrent-nox$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
python3 \ fi && \
qt6-qtbase \ apk add -U --upgrade --no-cache \
zlib && \ qbittorrent-nox==${QBITTORRENT_VERSION} && \
apk add -U --upgrade --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main/ unrar && \
echo "***** install qbitorrent-cli ****" && \ echo "***** install qbitorrent-cli ****" && \
if [ -z ${QBT_VERSION+x} ]; then \ if [ -z ${QBT_VERSION+x} ]; then \
QBT_VERSION=$(curl -sX GET "https://api.github.com/repos/ludviglundgren/qbittorrent-cli/releases/latest" \ QBT_VERSION=$(curl -sX GET "https://api.github.com/repos/ludviglundgren/qbittorrent-cli/releases/latest" \
@ -114,19 +31,19 @@ RUN \
fi && \ fi && \
curl -o \ curl -o \
/tmp/qbt.tar.gz -L \ /tmp/qbt.tar.gz -L \
"https://github.com/ludviglundgren/qbittorrent-cli/releases/download/${QBT_VERSION}/qbittorrent-cli_$(echo $QBT_VERSION | cut -c2-)_linux_amd64.tar.gz" && \ "https://github.com/ludviglundgren/qbittorrent-cli/releases/download/${QBT_VERSION}/qbittorrent-cli_$(echo $QBT_VERSION | cut -c2-)_linux_armv6.tar.gz" && \
tar xzf \ tar xzf \
/tmp/qbt.tar.gz -C \ /tmp/qbt.tar.gz -C \
/tmp && \ /tmp && \
mv /tmp/qbt /usr/bin && \ mv /tmp/qbt /usr/bin && \
echo "**** cleanup ****" && \ echo "**** cleanup ****" && \
rm -rf \ rm -rf \
/tmp/* \ /tmp/*
/var/tmp/*
# add local files # add local files
COPY root/ / COPY root/ /
# ports and volumes # ports and volumes
EXPOSE 6881 6881/udp 8080 EXPOSE 8080 6881 6881/udp
VOLUME /config VOLUME /config

View file

@ -2,8 +2,7 @@
# jenkins variables # jenkins variables
project_name: docker-qbittorrent project_name: docker-qbittorrent
external_type: na external_type: alpine_repo
custom_version_command: "curl -sX GET 'https://api.github.com/repos/qbittorrent/qBittorrent/tags' | jq -r '.[].name' | grep -Po -m 1 '^release-(\\\\d+(\\\\.)?)+$'"
release_type: stable release_type: stable
release_tag: latest release_tag: latest
ls_branch: master ls_branch: master
@ -16,6 +15,9 @@ 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 = 'edge'
- DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/edge/community/'
- DIST_REPO_PACKAGES = 'qbittorrent-nox'
- MULTIARCH='true' - MULTIARCH='true'
- CI='true' - CI='true'
- CI_WEB='true' - CI_WEB='true'

View file

@ -69,6 +69,7 @@ app_setup_block: |
# changelog # changelog
changelogs: changelogs:
- { date: "23.02.22:", desc: "Rebase to Alpine Edge, install from Alpine repos." }
- { date: "19.02.22:", desc: "Add jq to build-stage" } - { date: "19.02.22:", desc: "Add jq to build-stage" }
- { date: "07.01.22:", desc: "Rebase to Alpine, build from source." } - { date: "07.01.22:", desc: "Rebase to Alpine, build from source." }
- { date: "06.01.22:", desc: "Deprecate unstable branch." } - { date: "06.01.22:", desc: "Deprecate unstable branch." }

View file

@ -7,13 +7,6 @@ mkdir -p /config/qBittorrent
[[ ! -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