# This Dockerfile builds qBittorrent from source (no GUI) using a headless server (qbittorrent-nox) FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ cmake \ ninja-build \ git \ pkg-config \ libssl-dev \ zlib1g-dev \ libboost-all-dev \ libtorrent-rasterbar-dev \ libmicrohttpd-dev \ ca-certificates \ && rm -rf /var/lib/apt/lists/* # Build from source WORKDIR /qbittorrent COPY . /qbittorrent # Create build directory RUN mkdir -p build WORKDIR /qbittorrent/build # Configure the project (no GUI, enable WebUI) RUN cmake .. -G Ninja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DGUI=OFF \ -DWEBUI=ON \ -DTESTING=OFF \ -DCMAKE_INSTALL_PREFIX=/usr # Build and install RUN cmake --build . -j$(nproc) RUN cmake --install . # Default to running the nox web UI server in foreground CMD ["qbittorrent-nox"]
# Ignore VCS and build artifacts .git .gitignore build/ dist/ CMakeFiles/ CMakeCache.txt cmake_install.cmake Makefile *.log *.o *.obj *.a *.so *.dll *.tar *.gz *.zip *.class *.exe *.out qbittorrent-build/ README.md README */
Failing command/step
- [7/9] RUN cmake .. -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGUI=OFF -DWEBUI=ON -DTESTING=OFF -DCMAKE_INSTALL_PREFIX=/usr
Exact error messages
- The run failed with:
- "ERROR: process "/bin/sh -c cmake .. -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGUI=OFF -DWEBUI=ON -DTESTING=OFF -DCMAKE_INSTALL_PREFIX=/usr" did not complete successfully: exit code: 1"
- CMake/configure error details:
- CMake Output:
- "CMake Error at cmake/Modules/CheckPackages.cmake:11 (message):
Package LibtorrentRasterbar >= 2.0.10 not found with CMake or pkg-config.
- Set LibtorrentRasterbar_DIR to a directory containing a
LibtorrentRasterbarConfig.cmake file or add the installation prefix of
LibtorrentRasterbar to CMAKE_PREFIX_PATH.
- Alternatively, make sure there is a valid libtorrent-rasterbar.pc file in
your system's pkg-config search paths (use PKG_CONFIG_PATH to specify additional search paths if needed).
Call Stack (most recent call first):
cmake/Modules/CheckPackages.cmake:41 (find_libtorrent)
CMakeLists.txt:55 (include)
-- Configuring incomplete, errors occurred!
See also "/qbittorrent/build/CMakeFiles/CMakeOutput.log"."
- Also shown: "See also ..." and the context indicates the failure occurred during the configure step.
Failing step context
- The failure happened during the CMake configuration stage inside the build step that runs:
- cmake .. -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGUI=OFF -DWEBUI=ON -DTESTING=OFF -DCMAKE_INSTALL_PREFIX=/usr
Missing packages or files mentioned
- "Package LibtorrentRasterbar >= 2.0.10 not found with CMake or pkg-config."
- Guidance suggests missing installation metadata:
- LibtorrentRasterbarConfig.cmake (to be found via LibtorrentRasterbar_DIR or via CMAKE_PREFIX_PATH)
- libtorrent-rasterbar.pc in pkg-config search paths (PKG_CONFIG_PATH)
- Version note shown in log:
- "Requested 'libtorrent-rasterbar >= 2.0.10' but version of libtorrent is 2.0.5" (separate line indicating a version mismatch)
Version mismatch information
- The build log shows:
- "Requested 'libtorrent-rasterbar >= 2.0.10' but version of libtorrent is 2.0.5"
- This explains why the LibtorrentRasterbar >= 2.0.10 check fails.
Notes
- The error arises despite installing libtorrent-rasterbar-dev; the installed version appears to be 2.0.5, not satisfying the 2.0.10 minimum.
- Resolution would involve providing a libtorrent-rasterbar version >= 2.0.10 (or adjusting CMake/pkg-config paths to point to a compatible installation, e.g., via LibtorrentRasterbar_DIR or PKG_CONFIG_PATH).
Additional reference
- See also /qbittorrent/build/CMakeFiles/CMakeOutput.log.# This Dockerfile builds qBittorrent from source (no GUI) using a headless server (qbittorrent-nox)
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
ninja-build \
git \
pkg-config \
libssl-dev \
zlib1g-dev \
libboost-all-dev \
libmicrohttpd-dev \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Build a recent libtorrent-rasterbar from source to satisfy minimum version requirement
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
ca-certificates \
git; \
rm -rf /var/lib/apt/lists/*
WORKDIR /qbittorrent
# Build libtorrent-rasterbar (version v2.0.11 as used by CI matrix)
RUN useradd -m builduser
USER builduser
RUN git clone --branch v2.0.11 --depth 1 https://github.com/arvidn/libtorrent.git /tmp/libtorrent
RUN mkdir -p /tmp/libtorrent/build
WORKDIR /tmp/libtorrent/build
RUN cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_STANDARD=20 -DCMAKE_INSTALL_PREFIX=/usr -Ddeprecated-functions=OFF /tmp/libtorrent
RUN cmake --build . -j$(nproc)
RUN sudo cmake --install .
USER root
# Build from source: switch back to root for file copy
WORKDIR /qbittorrent
# Copy source code
COPY . /qbittorrent
# Create build directory
RUN mkdir -p build
WORKDIR /qbittorrent/build
# Configure the project (no GUI, enable WebUI)
RUN cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DGUI=OFF \
-DWEBUI=ON \
-DTESTING=OFF \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_PREFIX_PATH=/usr
# Build and install
RUN cmake --build . -j$(nproc)
RUN cmake --install .
# Default to running the nox web UI server in foreground
CMD ["qbittorrent-nox"]
Concerns: The build step attempts to run 'sudo cmake --install .' as the non-root user 'builduser', but sudo is not installed and the build user cannot gain root privileges. This will fail during the libtorrent installation., Even if sudo were installed, installing to /usr typically requires root privileges; using sudo inside a container build is fragile and may not be portable., Potential additional minor issues: duplication of ca-certificates/git installation steps is redundant but not fatal; ensure the libtorrent build actually links correctly with the rest of the project (static vs shared libs).
# This Dockerfile builds qBittorrent from source (no GUI) using a headless server (qbittorrent-nox) FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ cmake \ ninja-build \ git \ pkg-config \ libssl-dev \ zlib1g-dev \ libboost-all-dev \ libmicrohttpd-dev \ ca-certificates \ && rm -rf /var/lib/apt/lists/* # Build a recent libtorrent-rasterbar from source to satisfy minimum version requirement RUN set -eux; \ git clone --branch v2.0.11 --depth 1 https://github.com/arvidn/libtorrent.git /tmp/libtorrent; \ mkdir -p /tmp/libtorrent/build; \ cd /tmp/libtorrent/build; \ cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_STANDARD=20 -DCMAKE_INSTALL_PREFIX=/usr -Ddeprecated-functions=OFF /tmp/libtorrent; \ cmake --build . -j$(nproc); \ cmake --install .; \ ldconfig # Build from source: copy the repository and build without GUI WORKDIR /qbittorrent COPY . /qbittorrent # Create build directory RUN mkdir -p build WORKDIR /qbittorrent/build # Configure the project (no GUI, enable WebUI) RUN cmake .. -G Ninja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DGUI=OFF \ -DWEBUI=ON \ -DTESTING=OFF \ -DCMAKE_INSTALL_PREFIX=/usr # Build and install RUN cmake --build . -j$(nproc) RUN cmake --install . # Default to running the nox web UI server in foreground CMD ["qbittorrent-nox"]
Error summary: - Exact error messages and exit code: CMake Error at CMakeLists.txt:547 (add_library): Cannot find source file: deps/try_signal/try_signal.cpp Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc CMake Error at CMakeLists.txt:547 (add_library): No SOURCES given to target: torrent-rasterbar CMake Generate step failed. Build files cannot be regenerated correctly. - Failing command/step: RUN set -eux; git clone --branch v2.0.11 --depth 1 https://github.com/arvidn/libtorrent.git /tmp/libtorrent; mkdir -p /tmp/libtorrent/build; cd /tmp/libtorrent/build; cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_STANDARD=20 -DCMAKE_INSTALL_PREFIX=/usr -Ddeprecated-functions=OFF /tmp/libtorrent; cmake --build . -j$(nproc); cmake --install .; ldconfig - Missing packages or files mentioned: - Missing source file: deps/try_signal/try_signal.cpp (causes "Cannot find source file" in CMake) - Resulting condition: No sources provided to the torrent-rasterbar target - Version mismatch / compatibility info observed: - Cloning libtorrent from tag/branch: v2.0.11 (git clone --branch v2.0.11 --depth 1 ...) - Found/OpenSSL and Boost results shown earlier, e.g., Found OpenSSL 3.0.2 and Boost 1.74.0 during CMake configure - The error stems from the checked-out tag missing a required source file, suggesting a potential mismatch or incomplete tag/state for that libtorrent version. Context: - The build attempted to compile libtorrent rasterbar v2.0.11 against Boost 1.74.0 and OpenSSL 3.x, but CMake failed due to a missing file (deps/try_signal/try_signal.cpp) leading to “No SOURCES given to target: torrent-rasterbar.” The overall step failed with exit code 1.
# This Dockerfile builds qBittorrent from source (no GUI) using a headless server (qbittorrent-nox) FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ cmake \ ninja-build \ git \ pkg-config \ libssl-dev \ zlib1g-dev \ libboost-all-dev \ libmicrohttpd-dev \ ca-certificates \ ca-certificates \ && rm -rf /var/lib/apt/lists/* # Build a recent libtorrent-rasterbar from source to satisfy minimum version requirement RUN set -eux; \ git clone --branch v2.0.11 --depth 1 --recurse-submodules https://github.com/arvidn/libtorrent.git /tmp/libtorrent; \ mkdir -p /tmp/libtorrent/build; \ cd /tmp/libtorrent/build; \ cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_STANDARD=20 -DCMAKE_INSTALL_PREFIX=/usr -Ddeprecated-functions=OFF /tmp/libtorrent; \ cmake --build . -j$(nproc); \ cmake --install .; \ ldconfig # Build from source: copy the repository and build without GUI WORKDIR /qbittorrent COPY . /qbittorrent # Create build directory RUN mkdir -p build WORKDIR /qbittorrent/build # Configure the project (no GUI, enable WebUI) RUN cmake .. -G Ninja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DGUI=OFF \ -DWEBUI=ON \ -DTESTING=OFF \ -DCMAKE_INSTALL_PREFIX=/usr # Build and install RUN cmake --build . -j$(nproc) RUN cmake --install . # Default to running the nox web UI server in foreground CMD ["qbittorrent-nox"]
- Failing step (failing command/step): - Dockerfile step 8: RUN cmake .. -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGUI=OFF -DWEBUI=ON -DTESTING=OFF -DCMAKE_INSTALL_PREFIX=/usr - Exact error message and exit code: - CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message): - Could NOT find Boost: Found unsuitable version "1.74.0", but required is at least "1.76" (found /usr/include, ) - Call Stack (most recent call first): - /usr/share/cmake-3.22/Modules/FindBoost.cmake:2360 (find_package_handle_standard_args) - cmake/Modules/CheckPackages.cmake:46 (find_package) - CMakeLists.txt:55 (include) - Configuring incomplete, errors occurred! - Dockerfile:41 - ERROR: failed to build: failed to solve: process "/bin/sh -c cmake .. -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGUI=OFF -DWEBUI=ON -DTESTING=OFF -DCMAKE_INSTALL_PREFIX=/usr" did not complete successfully: exit code: 1 - Missing packages or files mentioned: - Boost library version mismatch: the build requires Boost >= 1.76, but the system provides Boost 1.74.0 (found in /usr/include). - Version mismatch information: - Found unsuitable version "1.74.0", but required is at least "1.76" (Boost). Notes: - The failure is due to a Boost version constraint during the CMake configuration for qbittorrent. Upgrading Boost to at least 1.76 (or aligning to the project’s specified Boost requirement) should resolve this step.
# This Dockerfile builds qBittorrent from source (no GUI) using a headless server (qbittorrent-nox) FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ cmake \ ninja-build \ git \ pkg-config \ libssl-dev \ zlib1g-dev \ libboost-all-dev \ libmicrohttpd-dev \ ca-certificates \ curl \ && rm -rf /var/lib/apt/lists/* # Install Boost >= 1.76 from source to satisfy project requirements WORKDIR /tmp RUN curl -L -o boost_1_78_0.tar.gz https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.gz \ && tar xf boost_1_78_0.tar.gz \ && cd boost_1_78_0 \ && ./bootstrap.sh \ && ./b2 install --prefix=/usr RUN ldconfig # Build from source: qbittorrent WORKDIR /qbittorrent COPY . /qbittorrent # Create build directory RUN mkdir -p build WORKDIR /qbittorrent/build # Configure the project (no GUI, enable WebUI) RUN cmake .. -G Ninja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DGUI=OFF \ -DWEBUI=ON \ -DTESTING=OFF \ -DCMAKE_INSTALL_PREFIX=/usr # Build and install RUN cmake --build . -j$(nproc) RUN cmake --install . # Default to running the nox web UI server in foreground CMD ["qbittorrent-nox"]
- Exact error message and exit code
- gzip: stdin: not in gzip format
- tar: Child returned status 1
- tar: Error is not recoverable: exiting now
- The RUN command exited with code 2
- Failing command/step
- [ 4/12] RUN curl -L -o boost_1_78_0.tar.gz https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.gz && tar xf boost_1_78_0.tar.gz && cd boost_1_78_0 && ./bootstrap.sh && ./b2 install --prefix=/usr
- Missing packages or files mentioned
- The downloaded file boost_1_78_0.tar.gz is not a gzip tarball (gzip: stdin: not in gzip format), indicating the expected tarball was not retrieved correctly. The URL used is boost_1_78_0.tar.gz:
- https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.gz
- This suggests the tarball content is missing or replaced by non-tarball content (e.g., an HTML/error page).
- Version mismatch info
- Attempting to fetch Boost 1.78.0 source tarball (boost_1_78_0.tar.gz). The failure is due to the downloaded content not being a gzip tarball, not due to a mismatch in Boost version semantics, but rather an invalid/corrupted download URL or response.How to install Boost C++ library on Ubuntu 20.04 or 22.04 https://linux.how2shout.com/how-to-install-boost-c-on-ubuntu-20-04-or-22-04/ Dec 13, 2022 · Learn the steps to install the Boost C++ libraries on Ubuntu 20.04 Focal Fossa or Ubuntu 22.04 Jammy JellyFish using the command terminal. Ubuntu系统下轻松升级Boost库版本,解锁更高效开发体验 - 云原生实践 https://www.oryoy.com/news/ubuntu-xi-tong-xia-qing-song-sheng-ji-boost-ku-ban-ben-jie-suo-geng-gao-xiao-kai-fa-ti-yan.html Dec 26, 2024 · Boost库作为C++社区的强大库之一,其版本升级往往伴随着性能提升和新的功能。 本文将指导您在Ubuntu系统下轻松升级Boost库版本,以解锁更高效的开发体验。 准备工作 在开始升 … github codespaces 编译KiCad 6.0.2第二版 - 锦喵卫指挥使 - 博客园 https://www.cnblogs.com/RoyalGuardsTomCat/p/19755430 1 day ago · 在 Ubuntu 20.04 Server 上编译 KiCad 6.0.2 挑战较大,因为该系统的默认库(如 wxWidgets)版本较旧,而 KiCad 6.0 需要较新的图形和脚本库。 由于是 Server 版(通常没有图形 … build - Building Boost from sources on Linux - Stack Overflow https://stackoverflow.com/questions/53647596/building-boost-from-sources-on-linux Dec 6, 2018 · No. sudo apt-get install libboost-all-dev will install whatever x.y.z version of the boost libraries your distro (Debian, Ubuntu ...?) has packaged as libboost-all-dev in the latest pack 在Ubuntu上安装Boost的五种方法 (全网最全,建议收藏)_ubuntu安 … https://blog.csdn.net/qq_41854911/article/details/119454212 Jun 29, 2022 · 本文详细介绍了在Ubuntu系统中安装Boost库的四种方法:使用apt-get安装、手动下载并编译安装、通过指定Boost版本安装以及通过设置MPI安装。 每种方法都包括了具体的步骤和所需依 …
# This Dockerfile builds qBittorrent from source (no GUI) using a headless server (qbittorrent-nox) FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ cmake \ ninja-build \ git \ pkg-config \ libssl-dev \ zlib1g-dev \ libmicrohttpd-dev \ curl \ ca-certificates \ bzip2 \ tar \ libcrypto++-dev \ && rm -rf /var/lib/apt/lists/* # Install Boost >= 1.76 from source to satisfy project requirements WORKDIR /opt RUN set -eux; \ curl -L -o boost_1_76_0.tar.gz https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz; \ tar xf boost_1_76_0.tar.gz; \ cd boost_1_76_0; \ ./bootstrap.sh; \ ./b2 install --prefix=/usr; \ ldconfig # Build from source: qbittorrent WORKDIR /qbittorrent COPY . /qbittorrent # Create build directory RUN mkdir -p build WORKDIR /qbittorrent/build # Build libtorrent (v2.0.11) with submodules and then qbittorrent RUN set -eux; \ git clone --branch v2.0.11 --depth 1 --recurse-submodules https://github.com/arvidn/libtorrent.git /tmp/libtorrent; \ mkdir -p /tmp/libtorrent/build; \ cd /tmp/libtorrent/build; \ cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_STANDARD=20 -DCMAKE_INSTALL_PREFIX=/usr -Ddeprecated-functions=OFF /tmp/libtorrent; \ cmake --build . -j$(nproc); \ cmake --install .; \ ldconfig; \ cd /qbittorrent; \ # Configure the project (no GUI, enable WebUI) RUN cmake .. -G Ninja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DGUI=OFF \ -DWEBUI=ON \ -DTESTING=OFF \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_PREFIX_PATH=/usr # Build and install RUN cmake --build . -j$(nproc) RUN cmake --install . # Default to running the nox web UI server in foreground CMD ["qbittorrent-nox"]
Build status: build_failed Concerns - RUN step ends with "cd /qbittorrent; \" — stray line continuation; remove backslash for clarity and reliability. - Building Boost from source and libtorrent from source creates a very heavy image; consider caching, distro-provided Boost/libtorrent, or multi-stage builds. - COPY . /qbittorrent copies the entire repo; use .dockerignore or copy only needed files. - No EXPOSE declared; qbittorrent-nox (headless) uses port 8080 by default—expose and document if used as a service. Build error - Failing command/step: [ 4/11] RUN set -eux; curl -L -o boost_1_76_0.tar.gz https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz; tar xf boost_1_76_0.tar.gz; cd boost_1_76_0; ./bootstrap.sh; ./b2 install --prefix=/usr; ldconfig - Exact error message and exit code: gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now ... ERROR: failed to build: failed to solve: process "/bin/sh -c set -eux; curl -L -o boost_1_76_0.tar.gz https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz; tar xf boost_1_76_0.tar.gz; cd boost_1_76_0; ./bootstrap.sh; ./b2 install --prefix=/usr; ldconfig" did not complete successfully: exit code: 2 - Missing packages or files mentioned: No explicit missing packages/files; apt-get step completed. Failure is due to the downloaded Boost tarball not being a gzip file (likely HTML or redirected response). - Version mismatch info: - Boost version requested: boost_1_76_0 (tarball boost_1_76_0.tar.gz) - No explicit version mismatch noted; error suggests the downloaded file is not a gzip archive. URL: https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz
No results found.
# This Dockerfile builds qBittorrent from source (no GUI) using a headless server (qbittorrent-nox) FROM ubuntu:23.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ cmake \ ninja-build \ git \ pkg-config \ libssl-dev \ zlib1g-dev \ libboost-all-dev \ libtorrent-rasterbar-dev \ libmicrohttpd-dev \ ca-certificates \ curl \ && rm -rf /var/lib/apt/lists/* # Build from source: qbittorrent (no GUI) WORKDIR /qbittorrent COPY . /qbittorrent # Create build directory RUN mkdir -p build WORKDIR /qbittorrent/build # Configure the project (no GUI, enable WebUI) RUN cmake .. -G Ninja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DGUI=OFF \ -DWEBUI=ON \ -DTESTING=OFF \ -DCMAKE_INSTALL_PREFIX=/usr # Build and install RUN cmake --build . -j$(nproc) RUN cmake --install . # Default to running the nox web UI server in foreground CMD ["qbittorrent-nox"]
Summary of Docker build error
- Failing step (command):
- RUN apt-get update && apt-get install -y --no-install-recommends build-essential cmake ninja-build git pkg-config libssl-dev zlib1g-dev libboost-all-dev libtorrent-rasterbar-dev libmicrohttpd-dev ca-certificates curl && rm -rf /var/lib/apt/lists/*
- Exact error message(s) and exit code:
- E: The repository 'http://archive.ubuntu.com/ubuntu lunar Release' does not have a Release file.
- E: The repository 'http://archive.ubuntu.com/ubuntu lunar-updates Release' does not have a Release file.
- E: The repository 'http://security.ubuntu.com/ubuntu lunar-security Release' does not have a Release file.
- E: The repository 'http://archive.ubuntu.com/ubuntu lunar-backports Release' does not have a Release file.
- ERROR: failed to build: failed to solve: process "/bin/sh -c apt-get update && apt-get install -y --no-install-recommends build-essential cmake ninja-build git pkg-config libssl-dev zlib1g-dev libboost-all-dev libtorrent-rasterbar-dev libmicrohttpd-dev ca-certificates curl && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100
- Missing packages or files mentioned:
- The errors indicate missing Release files for the Ubuntu Lunar (23.04) repositories:
- http://archive.ubuntu.com/ubuntu lunar Release
- http://archive.ubuntu.com/ubuntu lunar-updates Release
- http://security.ubuntu.com/ubuntu lunar-security Release
- http://archive.ubuntu.com/ubuntu lunar-backports Release
- No specific missing package files were listed; the root cause is apt cannot fetch Release files.
- Version mismatch info:
- Base image uses ubuntu:23.04 (Lunar). The Lunar repositories no longer provide Release files, causing apt-get update to fail. This indicates a version mismatch/EOL for Ubuntu Lunar; advisable to switch to a supported Ubuntu version (e.g., 22.04 LTS jammy or 24.04).# This Dockerfile builds qBittorrent from source (no GUI) using a headless server (qbittorrent-nox) FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ cmake \ ninja-build \ git \ pkg-config \ libssl-dev \ zlib1g-dev \ libboost-all-dev \ libmicrohttpd-dev \ libtorrent-rasterbar-dev \ ca-certificates \ && rm -rf /var/lib/apt/lists/* # Build from source: qbittorrent (no GUI) WORKDIR /qbittorrent COPY . /qbittorrent # Create build directory RUN mkdir -p build WORKDIR /qbittorrent/build # Configure the project (no GUI, enable WebUI) RUN cmake .. -G Ninja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DGUI=OFF \ -DWEBUI=ON \ -DTESTING=OFF \ -DCMAKE_INSTALL_PREFIX=/usr # Build and install RUN cmake --build . -j$(nproc) RUN cmake --install . # Default to running the nox web UI server in foreground CMD ["qbittorrent-nox"]
Status: VerifyBuild status: build_failed Primary failure - Failing step: [7/9] RUN cmake .. -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGUI=OFF -DWEBUI=ON -DTESTING=OFF -DCMAKE_INSTALL_PREFIX=/usr - Exit code: 1 Exact errors (preserved) - Checking for module 'libtorrent-rasterbar>=2.0.10' - Requested 'libtorrent-rasterbar >= 2.0.10' but version of libtorrent is 2.0.5 - CMake Error at cmake/Modules/CheckPackages.cmake:11 (message): Package LibtorrentRasterbar >= 2.0.10 not found with CMake or pkg-config. - Set LibtorrentRasterbar_DIR to a directory containing a LibtorrentRasterbarConfig.cmake file or add the installation prefix of LibtorrentRasterbar to CMAKE_PREFIX_PATH. - Alternatively, make sure there is a valid libtorrent-rasterbar.pc file in your system's pkg-config search paths (use PKG_CONFIG_PATH to specify additional search paths if needed). - Call Stack (most recent call first): cmake/Modules/CheckPackages.cmake:41 (find_libtorrent) / CMakeLists.txt:55 (include) - Configuring incomplete, errors occurred! - Exact exit status: exit code 1 Root cause and package info - Cause: Version mismatch for libtorrent-rasterbar; build requires >= 2.0.10, system has 2.0.5 - Missing/affected packages: libtorrent-rasterbar (>= 2.0.10) not found - On this image, installed libtorrent-related packages show version 2.0.5: - libtorrent-rasterbar2.0 amd64 2.0.5-5 - libtorrent-rasterbar-dev amd64 2.0.5-5 Additional notable concerns (from logs) - No port exposed for the WebUI; no HEALTHCHECK or ready check (default WebUI port 8080) - CMake option -DTESTING=OFF may not map to an actual CMake option; builds could be brittle if upstream changes options - Runs as root (no non-root user) Recommended next steps - Install libtorrent-rasterbar >= 2.0.10 (or adjust build requirements to match available libs) - Ensure CMake/PkgConfig paths can locate libtorrent-rasterbar (e.g., set PKG_CONFIG_PATH, CMAKE_PREFIX_PATH, or LibtorrentRasterbar_DIR) - Re-run the build with the same cmake options if needed - Consider adding non-root user and a HEALTHCHECK when deploying
# This Dockerfile builds qBittorrent from source (no GUI) using a headless server (qbittorrent-nox)
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
ninja-build \
git \
pkg-config \
libssl-dev \
zlib1g-dev \
libboost-all-dev \
libmicrohttpd-dev \
ca-certificates \
curl \
&& rm -rf /var/lib/apt/lists/*
# Build libtorrent-rasterbar from source to satisfy minimum version requirements
WORKDIR /build
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
git \
cmake \
ninja-build \
pkg-config \
zlib1g-dev \
libssl-dev \
libboost-all-dev \
libcurl4-openssl-dev \
&& rm -rf /var/lib/apt/lists/*
RUN git clone --branch v2.0.11 --depth 1 --recurse-submodules https://github.com/arvidn/libtorrent.git /build/libtorrent
WORKDIR /build/libtorrent/build
RUN cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_STANDARD=20 -DCMAKE_INSTALL_PREFIX=/usr -Ddeprecated-functions=OFF /build/libtorrent
RUN cmake --build . -j$(nproc)
RUN cmake --install .
# Build from source: qbittorrent
WORKDIR /qbittorrent
COPY . /qbittorrent
# Create build directory
RUN mkdir -p build
WORKDIR /qbittorrent/build
# Configure the project (no GUI, enable WebUI)
RUN cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DGUI=OFF \
-DWEBUI=ON \
-DTESTING=OFF \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_PREFIX_PATH=/usr
# Build and install
RUN cmake --build . -j$(nproc)
RUN cmake --install .
# Default to running the nox web UI server in foreground
CMD ["qbittorrent-nox"]
- Exact error message and exit code - Could NOT find Boost: Found unsuitable version "1.74.0", but required is at least "1.76" (found /usr/include, ) - Configuring incomplete, errors occurred! - Exit code: 1 - Failing command/step - [14/16] RUN cmake .. -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGUI=OFF -DWEBUI=ON -DTESTING=OFF -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH=/usr - Missing packages or files mentioned - Boost version mismatch: environment has Boost 1.74.0 installed, but the build requires at least 1.76. - Context shows Boost headers found at /usr/include (1.74.0), which is insufficient for this configuration. - Version mismatch info - Initially Boost 1.74.x was detected (Boost 1.74.0 found). The qbittorrent build requires Boost 1.76+ (at least 1.76), causing the failure.
# This Dockerfile builds qBittorrent from source (no GUI) using a headless server (qbittorrent-nox) FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive # Basic build dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ cmake \ ninja-build \ git \ pkg-config \ libssl-dev \ zlib1g-dev \ libboost-all-dev \ libmicrohttpd-dev \ ca-certificates \ curl \ && rm -rf /var/lib/apt/lists/* # Build libtorrent-rasterbar (v2.0.x) from source to satisfy minimum version requirements WORKDIR /build RUN git clone --branch v2.0.11 --depth 1 https://github.com/arvidn/libtorrent.git /build/libtorrent WORKDIR /build/libtorrent RUN git submodule update --init --recursive RUN cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_STANDARD=20 -DCMAKE_INSTALL_PREFIX=/usr -Ddeprecated-functions=OFF /build/libtorrent RUN cmake --build . -j$(nproc) RUN cmake --install . RUN ldconfig # Build qBittorrent from source WORKDIR /qbittorrent COPY . /qbittorrent # Create build directory RUN mkdir -p build WORKDIR /qbittorrent/build # Configure the project (no GUI, enable WebUI) RUN cmake .. -G Ninja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DGUI=OFF \ -DWEBUI=ON \ -DTESTING=OFF \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_PREFIX_PATH=/usr # Build and install RUN cmake --build . -j$(nproc) RUN cmake --install . # Default to running the nox web UI server in foreground CMD ["qbittorrent-nox"]
- VerifyBuild status: build_failed
- Concerns:
- COPY . /qbittorrent requires qbittorrent source in the build context; risk of large/sensitive files (e.g., .git); use .dockerignore and a multi-stage build to minimize image size.
- Static linking of libtorrent is forced; ensure runtime dependencies for qbittorrent-nox are met (ldd output could help verify dynamic dependencies)
- Failing at qbittorrent build due to Boost version mismatch
- Exact error:
- CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
- Could NOT find Boost: Found unsuitable version "1.74.0", but required is at least "1.76" (found /usr/include, )
- Call Stack (most recent call first):
- /usr/share/cmake-3.22/Modules/FindBoost.cmake:2360 (find_package_handle_standard_args)
- cmake/Modules/CheckPackages.cmake:46 (find_package)
- CMakeLists.txt:55 (include)
- -- Configuring incomplete, errors occurred!
- See also "/qbittorrent/build/CMakeFiles/CMakeOutput.log".
- ERROR: process "/bin/sh -c cmake .. -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGUI=OFF -DWEBUI=ON -DTESTING=OFF -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH=/usr" did not complete successfully: exit code: 1
- Failing command/step:
- Step: 15/17
- Command: RUN cmake .. -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGUI=OFF -DWEBUI=ON -DTESTING=OFF -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH=/usr
- Working dir: /qbittorrent/build
- Dockerfile excerpt: RUN cmake .. -G Ninja ... (same options)
- Missing packages or files mentioned:
- Boost version requirement not met: required is at least 1.76, but the system has Boost 1.74.0 (Found unsuitable version "1.74.0", ...)
- Version mismatch info:
- Required Boost version: at least 1.76
- Found: 1.74.0 (in /usr/include)
- Context: libtorrent configuration earlier found Boost 1.74.0, but the qbittorrent build (GUI=OFF, WEBUI=ON) requires a newer Boost
- Additional context:
- Configuring incomplete; see /qbittorrent/build/CMakeFiles/CMakeOutput.log
- Log file path: /qbittorrent/build/CMakeFiles/CMakeOutput.log# Multi-stage build for qBittorrent (no GUI) with prebuilt libtorrent and Boost # Stage 1: Build Boost 1.76+ from source FROM ubuntu:22.04 AS builder_boost ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ cmake \ ninja-build \ curl \ ca-certificates \ pkg-config \ zlib1g-dev \ libssl-dev \ && rm -rf /var/lib/apt/lists/* WORKDIR /build/boost RUN curl -L -o boost_1_76_0.tar.gz https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz \ && tar -xzf boost_1_76_0.tar.gz \ && cd boost_1_76_0 \ && ./bootstrap.sh \ && ./b2 install --prefix=/usr/local RUN ldconfig # Stage 2: Build libtorrent-rasterbar (v2.0.11) from source using Boost 1.76 FROM ubuntu:22.04 AS builder_libtorrent ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ cmake \ ninja-build \ git \ curl \ ca-certificates \ pkg-config \ zlib1g-dev \ libssl-dev \ && rm -rf /var/lib/apt/lists/* COPY --from=builder_boost /usr/local /usr/local RUN ldconfig WORKDIR /build/libtorrent RUN git clone --depth 1 --branch v2.0.11 https://github.com/arvidn/libtorrent.git /build/libtorrent-src WORKDIR /build/libtorrent-src RUN cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_STANDARD=20 -DCMAKE_INSTALL_PREFIX=/usr -Ddeprecated-functions=OFF . RUN cmake --build . -j$(nproc) \ && cmake --install . # Stage 3: Build qBittorrent from source using the prepared libs FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ cmake \ ninja-build \ git \ pkg-config \ libssl-dev \ zlib1g-dev \ libmicrohttpd-dev \ ca-certificates \ curl \ libboost-all-dev \ procps \ lsof \ && rm -rf /var/lib/apt/lists/* # Copy installed Boost and LibTorrent tools COPY --from=builder_boost /usr/local /usr/local COPY --from=builder_libtorrent /usr/local /usr/local ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib WORKDIR /qbittorrent COPY . /qbittorrent RUN mkdir -p build WORKDIR /qbittorrent/build # Configure for no GUI but with WebUI RUN cmake .. -G Ninja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DGUI=OFF \ -DWEBUI=ON \ -DTESTING=OFF \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_PREFIX_PATH=/usr/local RUN cmake --build . -j$(nproc) \ && cmake --install . CMD ["qbittorrent-nox"]
- Exact error message and exit code - gzip: stdin: not in gzip format - tar: Child returned status 1 - tar: Error is not recoverable: exiting now - The overall process exited with code 2 - Failing command/step - Builder step: [builder_boost 4/5] RUN curl -L -o boost_1_76_0.tar.gz https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz && tar -xzf boost_1_76_0.tar.gz && cd boost_1_76_0 && ./bootstrap.sh && ./b2 install --prefix=/usr/local - Missing packages or files mentioned - No apt/yum package-missing errors shown in this failure. - The issue is not with missing packages, but with the downloaded Boost tarball: boost_1_76_0.tar.gz is not a valid gzip tarball (gzip: stdin: not in gzip format), implying the file at the URL is not a proper .tar.gz (potentially an HTML/redirect response or a different content). - Version mismatch info - Target version in this step: Boost 1.76.0 (boost_1_76_0.tar.gz) - No explicit version mismatch reported; the failure appears due to the downloaded file not being a valid gzip tarball rather than a version incompatibility.
# syntax=docker/dockerfile:1
FROM ubuntu:22.04 AS builder
ARG DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
build-essential cmake ninja-build git pkg-config \
libssl-dev zlib1g-dev \
libboost-all-dev \
libtorrent-rasterbar-dev \
qt6-base-dev qt6-svg-dev \
&& rm -rf /var/lib/apt/lists/*
# Clone the repository with submodules to ensure all sources are present
RUN git clone --recurse-submodules https://github.com/qbittorrent/qBittorrent.git /qbittorrent
WORKDIR /qbittorrent
# Create a dedicated build directory and configure the project
RUN mkdir build && cd build && \
cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBOOST_ROOT=/usr \
-DGUI=ON -DWEBUI=ON -DVERBOSE_CONFIGURE=ON -DTESTING=OFF
# Build steps
RUN cmake --build build --target qbt_update_translations \
&& cmake --build build \
&& cmake --build build --target check
# Install into /usr (will be copied to final image in a multi-stage build)
RUN cmake --install build
############################
# Final runtime image
############################
FROM ubuntu:22.04 AS final
# Copy installed files from builder to final image
COPY --from=builder /usr /usr
# Expose common qBittorrent ports
EXPOSE 8080
# Default command: run the GUI daemon if available; otherwise fallback will fail gracefully
CMD ["/usr/bin/qbittorrent"]
Concerns: Install prefix not explicitly set for the CMake install; the default is typically /usr/local, but the final stage copies /usr, which may lead to the qbittorrent binaries not being present in the final image., Launching the GUI binary in a container without a display (CMD runs the GUI qbittorrent) will fail in headless environments; consider using a headless variant such as qbittorrent-nox for a desktop_app workflow., The build may execute 'check' which could require GUI/test dependencies; ensure tests are appropriate for a non-interactive CI/container context or disable tests if not needed.
# syntax=docker/dockerfile:1
FROM ubuntu:22.04 AS builder
ARG DEBIAN_FRONTEND=noninteractive
ARG GUI=OFF
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
build-essential cmake ninja-build git pkg-config \
libssl-dev zlib1g-dev \
libboost-all-dev \
libtorrent-rasterbar-dev \
qt6-base-dev qt6-svg-dev \
curl \
&& rm -rf /var/lib/apt/lists/*
# Clone the repository with submodules to ensure all sources are present
RUN git clone --recurse-submodules https://github.com/qbittorrent/qBittorrent.git /qbittorrent
WORKDIR /qbittorrent
# Create a dedicated build directory and configure the project
RUN mkdir build && cd build && \
cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGUI=${GUI} \
-DWEBUI=ON \
-DVERBOSE_CONFIGURE=ON \
-DTESTING=OFF
# Build steps
RUN cmake --build build --target qbt_update_translations \
&& cmake --build build \
&& cmake --build build --target check
# Install into /usr (will be copied to final image in a multi-stage build)
RUN cmake --install build
############################
# Final runtime image
############################
FROM ubuntu:22.04 AS final
# Copy installed files from builder to final image
COPY --from=builder /usr /usr
# Add a small entrypoint to choose between qbittorrent-nox and qbittorrent
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Expose common qBittorrent ports
EXPOSE 8080
# Default command: run the (noX or GUI) variant depending on what was built
ENTRYPOINT ["/entrypoint.sh"]
# No CMD: arguments can be passed to the entrypoint and forwarded to the binary
#!/bin/sh # If qbittorrent-nox exists, run it; otherwise run qbittorrent (GUI may fail in headless env) if [ -x /usr/bin/qbittorrent-nox ]; then exec /usr/bin/qbittorrent-nox "$@" fi if [ -x /usr/bin/qbittorrent ]; then exec /usr/bin/qbittorrent "$@" fi # If neither found, print error echo "No qbittorrent binary found" exit 1
**/.git **/node_modules **/build **/*.log
Failing step
- [builder 2/7] RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates build-essential cmake ninja-build git pkg-config libssl-dev zlib1g-dev libboost-all-dev libtorrent-rasterbar-dev qt6-base-dev qt6-svg-dev curl && rm -rf /var/lib/apt/lists/*
Exact error message and exit code
- Error message: E: Unable to locate package qt6-svg-dev
- Exit code: 100
- Complete failing command/step (from Dockerfile excerpt):
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
build-essential cmake ninja-build git pkg-config \
libssl-dev zlib1g-dev \
libboost-all-dev \
libtorrent-rasterbar-dev \
qt6-base-dev qt6-svg-dev \
curl \
&& rm -rf /var/lib/apt/lists/*
Missing packages or files mentioned
- qt6-svg-dev (not found in the apt repositories)
Version mismatch / context
- Base image: ubuntu:22.04 (jammy)
- The apt update/apt install logs show Jammy repositories being used, but qt6-svg-dev isn’t available there, indicating a repository/package availability mismatch for this Ubuntu release (package may be named differently or not provided in these repos).# syntax=docker/dockerfile:1
FROM ubuntu:22.04 AS builder
ARG DEBIAN_FRONTEND=noninteractive
ARG GUI=OFF
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
build-essential cmake ninja-build git pkg-config \
libssl-dev zlib1g-dev \
libboost-all-dev \
libtorrent-rasterbar-dev \
\
&& if [ "$GUI" = "ON" ]; then apt-get install -y --no-install-recommends qt6-base-dev libqt6svg5-dev; fi \
&& curl -fsSL https://deb.nodesource.com/setup_14.x | bash - >/dev/null 2>&1 || true \
&& rm -rf /var/lib/apt/lists/*
# Clone the repository with submodules to ensure all sources are present
RUN git clone --recurse-submodules https://github.com/qbittorrent/qBittorrent.git /qbittorrent
WORKDIR /qbittorrent
# Create a dedicated build directory and configure the project
RUN mkdir build && cd build && \
cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGUI=${GUI} \
-DWEBUI=ON \
-DVERBOSE_CONFIGURE=ON \
-DTESTING=OFF
# Build steps
RUN cmake --build build --target qbt_update_translations \
&& cmake --build build \
&& cmake --build build --target check
# Install into /usr (will be copied to final image in a multi-stage build)
RUN cmake --install build
############################
# Final runtime image
############################
FROM ubuntu:22.04 AS final
# Copy installed files from builder to final image
COPY --from=builder /usr /usr
# Add a small entrypoint to choose between qbittorrent-nox and qbittorrent
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Expose common qBittorrent ports
EXPOSE 8080
# Default command: run the (noX or GUI) variant depending on what was built
ENTRYPOINT ["/entrypoint.sh"]
# No CMD: arguments can be passed to the entrypoint and forwarded to the binary
#!/bin/sh # If qbittorrent-nox exists, run it; otherwise run qbittorrent (GUI may fail in headless env) if [ -x /usr/bin/qbittorrent-nox ]; then exec /usr/bin/qbittorrent-nox "$@" fi if [ -x /usr/bin/qbittorrent ]; then exec /usr/bin/qbittorrent "$@" fi # If neither found, print error echo "No qbittorrent binary found" exit 1
Concerns
- entrypoint.sh is referenced in the final image but not shown in the Dockerfile context; if missing from build context, docker build will fail.
- Building qbittorrent from source inside the image relies on network access; consider caching or vendoring sources.
- GUI flag: -DGUI=${GUI} and -DWEBUI=ON; with GUI=OFF ensure qbittorrent-nox is produced and tested; otherwise final image may lack a usable no-GUI binary.
- No explicit CMD in final image; rely on external entrypoint to select GUI vs headless; verify entrypoint starts the intended variant.
Build error
- Failing step (Exit code 1): [builder 5/7] RUN mkdir build && cd build && cmake .. -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DGUI=${GUI} -DWEBUI=ON -DVERBOSE_CONFIGURE=ON -DTESTING=OFF
Exact error messages (preserved)
- "The CXX compiler identification is GNU 11.4.0" (informational)
- "The following features have been enabled:" (informational)
- "Checking for module 'libtorrent-rasterbar>=2.0.10'"
- " Requested 'libtorrent-rasterbar >= 2.0.10' but version of libtorrent is 2.0.5"
- "CMake Error at cmake/Modules/CheckPackages.cmake:11 (message):"
- " Package LibtorrentRasterbar >= 2.0.10 not found with CMake or pkg-config."
- ""
- " - Set LibtorrentRasterbar_DIR to a directory containing a"
- " LibtorrentRasterbarConfig.cmake file or add the installation prefix of"
- " LibtorrentRasterbar to CMAKE_PREFIX_PATH."
- ""
- " - Alternatively, make sure there is a valid libtorrent-rasterbar.pc file in"
- " your system's pkg-config search paths (use PKG_CONFIG_PATH to specify additional search paths if needed)."
- "Call Stack (most recent call first):"
- " cmake/Modules/CheckPackages.cmake:41 (find_libtorrent)"
- " CMakeLists.txt:55 (include)"
- ""
- "-- Configuring incomplete, errors occurred!"
- "See also \"/qbittorrent/build/CMakeFiles/CMakeOutput.log\"."
Missing packages/files mentioned
- libtorrent-rasterbar >= 2.0.10 not found (runtime version is 2.0.5).
- curl not found at the end of apt install step: "/bin/sh: 1: curl: not found"
Version mismatch info
- Required: libtorrent-rasterbar >= 2.0.10
- Found: libtorrent-rasterbar 2.0.5 (installed)
- This mismatch triggered the CMake error that halted configuration.# syntax=docker/dockerfile:1
###################################
# LibTorrent build (from source) stage
###################################
FROM ubuntu:22.04 AS libtorrent
ARG DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build git pkg-config \
libssl-dev zlib1g-dev \
libboost-all-dev \
&& rm -rf /var/lib/apt/lists/*
# Build libtorrent (v2.0.11, compatible with qBittorrent CI expectations)
RUN git clone --branch v2.0.11 --depth 1 --recurse-submodules https://github.com/arvidn/libtorrent.git /lt
WORKDIR /lt
RUN cmake -B build -G Ninja \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_PREFIX_PATH=/usr \
-DBOOST_ROOT=/usr \
-Ddeprecated-functions=OFF
RUN cmake --build build \
&& cmake --install build
###################################
# qBittorrent build stage
###################################
FROM ubuntu:22.04 AS builder
ARG DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies (no GUI tools required for no-GUI build)
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build git pkg-config \
libssl-dev zlib1g-dev \
libboost-all-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy libtorrent built in previous stage
COPY --from=libtorrent /usr /usr
# Clone qBittorrent repository (with submodules)
RUN git clone --recurse-submodules https://github.com/qbittorrent/qBittorrent.git /qbittorrent
WORKDIR /qbittorrent
# Configure build (no GUI, enable WebUI for remote control in headless container)
RUN mkdir build && cd build && \
cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGUI=OFF \
-DWEBUI=ON \
-DVERBOSE_CONFIGURE=ON \
-DTESTING=OFF \
-DCMAKE_PREFIX_PATH=/usr \
-DLibtorrentRasterbar_DIR=/usr/lib/x86_64-linux-gnu/cmake/LibtorrentRasterbar
# Build and install
RUN cmake --build build \
&& cmake --install build
###################################
# Final runtime image
###################################
FROM ubuntu:22.04 AS final
# Copy runtime-available binaries and libraries from builder
COPY --from=builder /usr /usr
# Copy entrypoint to start appropriate qbittorrent variant
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Expose common port for WebUI
EXPOSE 8080
ENTRYPOINT ["/entrypoint.sh"]
#!/bin/sh # Prefer qbittorrent-nox if available if [ -x /usr/bin/qbittorrent-nox ]; then exec /usr/bin/qbittorrent-nox "$@" fi # Fallback to GUI binary if present (should not require display in headless env) if [ -x /usr/bin/qbittorrent ]; then exec /usr/bin/qbittorrent "$@" fi echo "No qbittorrent binary found" exit 1
# Ignore VCS .git # Ignore build outputs build qbittorrent/dist # Ignore temporary files *.log
- Exact error message and exit code - fatal: unable to access 'https://github.com/arvidn/libtorrent.git/': server certificate verification failed. CAfile: none CRLfile: none - Exit code: 128 - Failing command/step - [libtorrent 3/6] RUN git clone --branch v2.0.11 --depth 1 --recurse-submodules https://github.com/arvidn/libtorrent.git /lt - Missing packages or files mentioned - TLS certificate verification failure indicates a missing CA certificates bundle in the image (CAfile: none). Likely caused by ca-certificates not being installed in the base image. - Version mismatch information - Base image: Ubuntu 22.04 (jammy) - Libtorrent version/branch being fetched: v2.0.11 (clone from https://github.com/arvidn/libtorrent.git) on branch v2.0.11 - Additional context - The error occurs during the libtorrent build step, not during the initial apt-get install steps. The underlying issue is missing CA certificates in the container, causing GitHub TLS verification to fail.
# syntax=docker/dockerfile:1
###################################
# LibTorrent build (from source) stage
###################################
FROM ubuntu:22.04 AS libtorrent
ARG DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
build-essential cmake ninja-build git pkg-config \
libssl-dev zlib1g-dev \
libboost-all-dev \
&& rm -rf /var/lib/apt/lists/*
# Build libtorrent (v2.0.11, compatible with qBittorrent CI expectations)
RUN git clone --branch v2.0.11 --depth 1 --recurse-submodules https://github.com/arvidn/libtorrent.git /lt
WORKDIR /lt
RUN cmake -B build -G Ninja \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_PREFIX_PATH=/usr \
-DBOOST_ROOT=/usr \
-Ddeprecated-functions=OFF
RUN cmake --build build \
&& cmake --install build
###################################
# qBittorrent build stage
###################################
FROM ubuntu:22.04 AS builder
ARG DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies (no GUI tools required for no-GUI build)
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build git pkg-config \
libssl-dev zlib1g-dev \
libboost-all-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy libtorrent built in previous stage
COPY --from=libtorrent /usr /usr
# Clone qBittorrent repository (with submodules)
RUN git clone --recurse-submodules https://github.com/qbittorrent/qBittorrent.git /qbittorrent
WORKDIR /qbittorrent
# Configure build (no GUI, enable WebUI for remote control in headless container)
RUN mkdir build && cd build && \
cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGUI=OFF \
-DWEBUI=ON \
-DVERBOSE_CONFIGURE=ON \
-DTESTING=OFF \
-DCMAKE_PREFIX_PATH=/usr \
-DLibtorrentRasterbar_DIR=/usr/lib/x86_64-linux-gnu/cmake/LibtorrentRasterbar
# Build and install
RUN cmake --build build \
&& cmake --install build
###################################
# Final runtime image
###################################
FROM ubuntu:22.04 AS final
# Copy runtime-available binaries and libraries from builder
COPY --from=builder /usr /usr
# Copy entrypoint to start appropriate qbittorrent variant
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Expose common port for WebUI
EXPOSE 8080
ENTRYPOINT ["/entrypoint.sh"]
#!/bin/sh # Prefer qbittorrent-nox if available if [ -x /usr/bin/qbittorrent-nox ]; then exec /usr/bin/qbittorrent-nox "$@" fi # Fallback to GUI binary if present (should not require display in headless env) if [ -x /usr/bin/qbittorrent ]; then exec /usr/bin/qbittorrent "$@" fi echo "No qbittorrent binary found" exit 1
placeholder
- Exact error message and exit code: - fatal: unable to access 'https://github.com/qbittorrent/qBittorrent.git/': server certificate verification failed. CAfile: none CRLfile: none - Exit code: 128 - Failing command/step: - [builder 4/7] RUN git clone --recurse-submodules https://github.com/qbittorrent/qBittorrent.git /qbittorrent - Missing packages or files mentioned: - TLS certificate trust store is missing in the final image: CAfile: none CRLfile: none - This implies CA certificates (ca-certificates / CA bundle) are not available in the stage where git tries to clone, causing server certificate verification to fail. - Version mismatch / context notes: - The log shows prior installs of ca-certificates and related TLS/OpenSSL components during libtorrent build, but the clone step runs in a later stage where the CA bundle appears to be absent. - No explicit library version mismatch is shown for this step; the issue is TLS trust store availability (CA certificates) rather than a compiler or library version conflict.
# syntax=docker/dockerfile:1
###################################
# LibTorrent build (from source) stage
###################################
FROM ubuntu:22.04 AS libtorrent
ARG DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
build-essential cmake ninja-build git pkg-config \
libssl-dev zlib1g-dev \
libboost-all-dev \
&& rm -rf /var/lib/apt/lists/*
# Ensure CA certificates are properly configured
RUN update-ca-certificates || true
# Build libtorrent (v2.0.11, compatible with qBittorrent CI expectations)
RUN git clone --branch v2.0.11 --depth 1 --recurse-submodules https://github.com/arvidn/libtorrent.git /lt
WORKDIR /lt
RUN cmake -B build -G Ninja \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_PREFIX_PATH=/usr \
-DBOOST_ROOT=/usr \
-Ddeprecated-functions=OFF
RUN cmake --build build \
&& cmake --install build
###################################
# qBittorrent build stage
###################################
FROM ubuntu:22.04 AS builder
ARG DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies (no GUI tools required for no-GUI build)
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build git pkg-config \
libssl-dev zlib1g-dev \
libboost-all-dev \
&& rm -rf /var/lib/apt/lists/*
# Ensure CA certificates are properly configured in builder stage
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& update-ca-certificates || true
# Copy libtorrent built in previous stage
COPY --from=libtorrent /usr /usr
# Clone qBittorrent repository (with submodules)
RUN git clone --recurse-submodules https://github.com/qbittorrent/qBittorrent.git /qbittorrent
WORKDIR /qbittorrent
# Configure build (no GUI, enable WebUI for remote control in headless container)
RUN mkdir build && cd build && \
cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGUI=OFF \
-DWEBUI=ON \
-DVERBOSE_CONFIGURE=ON \
-DTESTING=OFF \
-DCMAKE_PREFIX_PATH=/usr \
-DLibtorrentRasterbar_DIR=/usr/lib/x86_64-linux-gnu/cmake/LibtorrentRasterbar
# Build and install
RUN cmake --build build \
&& cmake --install build
###################################
# Final runtime image
###################################
FROM ubuntu:22.04 AS final
# Copy runtime-available binaries and libraries from builder
COPY --from=builder /usr /usr
# Copy entrypoint to start appropriate qbittorrent variant
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Expose common port for WebUI
EXPOSE 8080
ENTRYPOINT ["/entrypoint.sh"]
#!/bin/sh # Prefer qbittorrent-nox if available if [ -x /usr/bin/qbittorrent-nox ]; then exec /usr/bin/qbittorrent-nox "$@" fi # Fallback to GUI binary if present (should not require display in headless env) if [ -x /usr/bin/qbittorrent ]; then exec /usr/bin/qbittorrent "$@" fi echo "No qbittorrent binary found" exit 1
**/.git **/node_modules **/build **/*.log
Error summary: - Failing step (failing command/step): [builder 7/8] RUN mkdir build && cd build && cmake .. -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DGUI=OFF -DWEBUI=ON -DVERBOSE_CONFIGURE=ON -DTESTING=OFF -DCMAKE_PREFIX_PATH=/usr -DLibtorrentRasterbar_DIR=/usr/lib/x86_64-linux-gnu/cmake/LibtorrentRasterbar - Exact error message and exit code: Could NOT find Boost: Found unsuitable version "1.74.0", but required is at least "1.76" (found /usr/include, ) Exit code: 1 - Missing packages or files mentioned: - Boost version is insufficient: installed version is 1.74.0, but at least 1.76 is required (no suitable Boost available to satisfy the check). The log shows BoostConfig.cmake for 1.74.0 being found (Boost-1.74.0). - Version mismatch information: - Found Boost 1.74.0 (path: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake or indicated as (found /usr/include, )) - Required minimum Boost version: 1.76 Context: This occurs during the qbittorrent build stage when configuring with CMake, after libtorrent was built and installed.
# syntax=docker/dockerfile:1
###################################
# Boost (from source) stage
###################################
FROM ubuntu:22.04 AS boost
ARG DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
build-essential curl ca-certificates \
bzip2 libbz2-dev \
zlib1g-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
# Build Boost 1.76 from source and install to /usr (system-wide in final container)
RUN mkdir -p /tmp/boost && \
cd /tmp/boost && \
curl -L -o boost_1_76_0.tar.gz https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz && \
tar -xf boost_1_76_0.tar.gz -C /tmp/boost --strip-components=0 && \
cd /tmp/boost/boost_1_76_0 && \
./bootstrap.sh --with-libraries=all --prefix=/usr && \
./b2 install
###################################
# LibTorrent build stage
###################################
FROM ubuntu:22.04 AS libtorrent
ARG DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
build-essential cmake ninja-build git pkg-config \
libssl-dev zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
# Use Boost from /usr (added by Boost stage)
COPY --from=boost /usr /usr
# Build libtorrent (v2.0.11) with Boost 1.76
RUN git clone --branch v2.0.11 --depth 1 --recurse-submodules https://github.com/arvidn/libtorrent.git /lt
WORKDIR /lt
RUN cmake -B build -G Ninja \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_PREFIX_PATH=/usr \
-DBOOST_ROOT=/usr \
-Ddeprecated-functions=OFF
RUN cmake --build build \
&& cmake --install build
###################################
# qBittorrent build stage
###################################
FROM ubuntu:22.04 AS builder
ARG DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND=noninteractive
# Install minimal build deps (no GUI libraries here)
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build git pkg-config \
libssl-dev zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy Boost and LibTorrent from previous stages
COPY --from=libtorrent /usr /usr
# Clone qBittorrent repo with submodules
RUN git clone --recurse-submodules https://github.com/qbittorrent/qBittorrent.git /qbittorrent
WORKDIR /qbittorrent
# Configure build (no GUI, WebUI enabled for headless remote management)
RUN mkdir build && cd build && \
cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGUI=OFF \
-DWEBUI=ON \
-DVERBOSE_CONFIGURE=ON \
-DTESTING=OFF \
-DCMAKE_PREFIX_PATH=/usr \
-DLibtorrentRasterbar_DIR=/usr/lib/x86_64-linux-gnu/cmake/LibtorrentRasterbar \
-DBOOST_ROOT=/usr
# Build and install
RUN cmake --build build \
&& cmake --install build
###################################
# Final runtime image
###################################
FROM ubuntu:22.04 AS final
# Copy runtime-available binaries and libraries from builder
COPY --from=builder /usr /usr
# Copy entrypoint to start appropriate qbittorrent variant
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Expose common port for WebUI
EXPOSE 8080
ENTRYPOINT ["/entrypoint.sh"]
placeholder updated
Concerns: The builder stage does not install Qt development libraries (e.g., qtbase5-dev/qt5-default or Qt6 equivalents). qBittorrent build (even with GUI=OFF) typically requires Qt headers and libraries; without them, the cmake configure/build is likely to fail., Final image copies only /usr from the builder. This may omit essential runtime libraries under /lib or /lib64 (and possibly other required paths) needed by the built binaries, potentially causing runtime failures., entrypoint.sh is copied but its contents are not shown; risk that it does not actually launch the qbittorrent-nox variant or requires additional runtime config not present in the final image.
# syntax=docker/dockerfile:1
###################################
# Boost: build Boost 1.76 from source
###################################
FROM ubuntu:22.04 AS boost
ARG DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
build-essential curl ca-certificates \
tar \
&& rm -rf /var/lib/apt/lists/*
# Ensure CA certificates are configured
RUN update-ca-certificates
WORKDIR /tmp
RUN curl -L -o boost_1_76_0.tar.gz https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz \
&& tar -xzf boost_1_76_0.tar.gz
WORKDIR /tmp/boost_1_76_0
RUN ./bootstrap.sh --prefix=/usr \
&& /usr/bin/env -i bash -lc './b2 install'
###################################
# LibTorrent build stage
###################################
FROM ubuntu:22.04 AS libtorrent
ARG DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
build-essential cmake ninja-build git pkg-config \
libssl-dev zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy Boost from previous stage
COPY --from=boost /usr /usr
# Build libtorrent (v2.0.11)
RUN git clone --branch v2.0.11 --depth 1 --recurse-submodules https://github.com/arvidn/libtorrent.git /lt
WORKDIR /lt
RUN cmake -B build -G Ninja \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_PREFIX_PATH=/usr \
-DBOOST_ROOT=/usr \
-Ddeprecated-functions=OFF
RUN cmake --build build \
&& cmake --install build
###################################
# qBittorrent build stage
###################################
FROM ubuntu:22.04 AS builder
ARG DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies (no GUI libraries required for non-GUI build)
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build git pkg-config \
libssl-dev zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy Boost and LibTorrent from previous stages
COPY --from=libtorrent /usr /usr
# Clone qBittorrent repository
RUN git clone --recurse-submodules https://github.com/qbittorrent/qBittorrent.git /qbittorrent
WORKDIR /qbittorrent
# Configure build (headless variant, but enable WebUI for remote control)
RUN mkdir build && cd build && \
cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGUI=OFF \
-DWEBUI=ON \
-DVERBOSE_CONFIGURE=ON \
-DTESTING=OFF \
-DCMAKE_PREFIX_PATH=/usr \
-DLibtorrentRasterbar_DIR=/usr/lib/x86_64-linux-gnu/cmake/LibtorrentRasterbar \
-DBOOST_ROOT=/usr
# Build and install
RUN cmake --build build \
&& cmake --install build
###################################
# Final runtime image
###################################
FROM ubuntu:22.04 AS final
# Copy runtime-available binaries and libraries from builder
COPY --from=builder /usr /usr
# Copy entrypoint to start appropriate qbittorrent variant
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Expose common port for WebUI
EXPOSE 8080
ENTRYPOINT ["/entrypoint.sh"]
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build pkg-config \
libssl-dev zlib1g-dev libboost-all-dev \
libtorrent-rasterbar-dev ca-certificates \
git curl \
&& rm -rf /var/lib/apt/lists/*
# Copy sources
WORKDIR /qbittorrent
COPY . /qbittorrent
# Build (no GUI to simplify dependencies)
RUN mkdir -p build && cd build \
&& cmake -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGUI=OFF \
-DWEBUI=ON \
-DSTACKTRACE=ON \
-DVERBOSE_CONFIGURE=OFF \
-DTESTING=OFF \
-DCMAKE_CXX_STANDARD=20 \
.. \
&& cmake --build build \
&& cmake --install build
FROM ubuntu:22.04
# Copy installed artifacts from builder
COPY --from=builder /usr /usr
# Copy entrypoint script (see entrypoint.sh) and ensure it's executable
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
# Exclude VCS and build artifacts .git .gitignore
Concerns: In the builder stage, after 'cd build', the command 'cmake --build build' tries to build a non-existent subdirectory; it should be 'cmake --build .' (or 'cmake --build /path/to/build') when already inside the build directory., Similarly, 'cmake --install build' is likely incorrect because it references a 'build' subdirectory that may not exist; it should be 'cmake --install .' or specify the correct path to the build tree., Assuming the entrypoint.sh exists is fine, but if it is missing in the repo, the COPY entrypoint.sh step will fail; ensure the script is present.
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build pkg-config \
libssl-dev zlib1g-dev \
libboost-all-dev libtorrent-rasterbar-dev \
ca-certificates \
git curl \
&& rm -rf /var/lib/apt/lists/*
# Copy sources
WORKDIR /qbittorrent
COPY . /qbittorrent
# Build (no GUI to simplify dependencies)
RUN mkdir -p build && cd build \
&& cmake -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGUI=OFF \
-DWEBUI=ON \
-DSTACKTRACE=ON \
-DVERBOSE_CONFIGURE=OFF \
-DTESTING=OFF \
-DCMAKE_CXX_STANDARD=20 \
.. \
&& cmake --build . \
&& cmake --install .
FROM ubuntu:22.04
# Copy installed artifacts from builder
COPY --from=builder /usr /usr
# Copy entrypoint script and ensure it's executable
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
# Default to running qbittorrent-nox inside the container
CMD ["qbittorrent-nox"]
- Build status: VerifyBuild -> build_failed. Exit code: 1 during builder step 5/5 (Docker build).
- Command that ran (relevant portion):
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DGUI=OFF -DWEBUI=ON -DSTACKTRACE=ON -DVERBOSE_CONFIGURE=OFF -DTESTING=OFF -DCMAKE_CXX_STANDARD=20 ..
- Root cause:
- Missing/too-old libtorrent-rasterbar: libtorrent-rasterbar >= 2.0.10 required, but installed version is 2.0.5.
- CMake/Pkg-config cannot satisfy: "Package LibtorrentRasterbar >= 2.0.10 not found with CMake or pkg-config."
- Suggested fixes in log:
- Set LibtorrentRasterbar_DIR to a directory containing LibtorrentRasterbarConfig.cmake
- Or ensure libtorrent-rasterbar.pc is in PKG_CONFIG_PATH
- Exact error messages to note:
- Checking for module 'libtorrent-rasterbar>=2.0.10'
- Requested 'libtorrent-rasterbar >= 2.0.10' but version of libtorrent is 2.0.5
- CMake error: Package LibtorrentRasterbar >= 2.0.10 not found with CMake or pkg-config.
- Call stack: cmake/Modules/CheckPackages.cmake:41 (find_libtorrent); CMakeLists.txt:55 (include)
- Missing vs present:
- Missing requirement: libtorrent-rasterbar >= 2.0.10
- Present version: 2.0.5
- Actionable next steps:
- Install libtorrent-rasterbar >= 2.0.10 (or upgrade system/libtorrent-rasterbar) and ensure headers/pc/cmake config are available.
- Alternatively build/install libtorrent-rasterbar 2.0.10+ from source, then:
- Set LibtorrentRasterbar_DIR to the directory containing LibtorrentRasterbarConfig.cmake
- Or ensure libtorrent-rasterbar.pc is in PKG_CONFIG_PATH
- Re-run the build after the library is discoverable.
- Additional concerns noted:
- No EXPOSE instruction; if external access is intended, expose port or document forwarding.
- COPY --from=builder /usr /usr may copy many files; consider limiting copied paths.
- entrypoint.sh is assumed to exist; ensure it handles signals and user permissions for proper stop behavior.#!/bin/sh set -e if [ "$1" = "" ]; then exec qbittorrent-nox else exec "$@" fi
Summary (under 1500 chars):
- Failing command/step:
RUN mkdir -p build && cd build && cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DGUI=OFF -DWEBUI=ON -DSTACKTRACE=ON -DVERBOSE_CONFIGURE=OFF -DTESTING=OFF -DCMAKE_CXX_STANDARD=20 .. && cmake --build . && cmake --install .
- Exit code: 1
- Exact error message and context:
Package LibtorrentRasterbar >= 2.0.10 not found with CMake or pkg-config.
- Set LibtorrentRasterbar_DIR to a directory containing a LibtorrentRasterbarConfig.cmake file or add the installation prefix of LibtorrentRasterbar to CMAKE_PREFIX_PATH.
- Alternatively, make sure there is a valid libtorrent-rasterbar.pc file in your system's pkg-config search paths (use PKG_CONFIG_PATH to specify additional search paths if needed).
Call Stack (most recent call first):
cmake/Modules/CheckPackages.cmake:41 (find_libtorrent)
CMakeLists.txt:55 (include)
-- Requested 'libtorrent-rasterbar >= 2.0.10' but version of libtorrent is 2.0.5
-- Configuring incomplete, errors occurred!
See also "/qbittorrent/build/CMakeFiles/CMakeOutput.log".
- Missing packages or files mentioned:
- libtorrent-rasterbar >= 2.0.10 not found (installed version reported as 2.0.5).
- Version mismatch info:
- Requested libtorrent-rasterbar >= 2.0.10 but version of libtorrent is 2.0.5.FROM ubuntu:22.04 AS libtorrent
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build git ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /tmp
# Build libtorrent from source (v2.0.11 as a minimum)
RUN git clone --depth 1 --branch v2.0.11 https://github.com/arvidn/libtorrent.git libtorrent && \
cd libtorrent && \
mkdir build && cd build && \
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_CXX_STANDARD=20 \
.. && \
cmake --build . && \
cmake --install . && \
ldconfig
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build pkg-config libssl-dev zlib1g-dev \
libboost-all-dev ca-certificates \
git curl \
&& rm -rf /var/lib/apt/lists/*
# Copy prebuilt libtorrent into final image space
COPY --from=libtorrent /usr /usr
WORKDIR /qbittorrent
COPY . /qbittorrent
# Build qBittorrent from source without GUI (as a headless server)
RUN mkdir -p build && cd build \
&& cmake -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGUI=OFF \
-DWEBUI=ON \
-DSTACKTRACE=ON \
-DVERBOSE_CONFIGURE=OFF \
-DTESTING=OFF \
-DCMAKE_CXX_STANDARD=20 \
-DBOOST_ROOT=/usr \
.. \
&& cmake --build . \
&& cmake --install .
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
# Minimal runtime: only runtime libs needed by qbittorrent-nox
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Copy built qbittorrent binaries from builder stage
COPY --from=builder /usr /usr
# Entrypoint
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
- Build status: VerifyBuild status: build_failed
- Primary concerns:
- libtorrent build stage does not install OpenSSL development headers (libssl-dev) or zlib development headers; building libtorrent from source may fail in this stage due to missing dev packages.
- entrypoint.sh is referenced but not shown; ensure it exists in the build context, is executable, and qbittorrent-nox runs in the foreground as the container's main process.
- COPY --from=libtorrent /usr /usr and COPY --from=builder /usr /usr copy a large /usr tree; common but may mask missing runtime dependencies or cause ABI mismatches if final runtime apt state isn’t coordinated.
- Build error (exact):
- Could NOT find Boost (missing: Boost_INCLUDE_DIR)
- The build failed with exit code: 1
- Failing command/step:
- libtorrent build step (libtorrent 4/4) in the Dockerfile:
git clone --depth 1 --branch v2.0.11 https://github.com/arvidn/libtorrent.git libtorrent && cd libtorrent && mkdir build && cd build && cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_STANDARD=20 .. && cmake --build . && cmake --install . && ldconfig
- Missing packages or files mentioned:
- Boost development headers/libs missing in this stage: Boost_INCLUDE_DIR not found
- libtorrent build step apt-get install line includes only: build-essential cmake ninja-build git ca-certificates (no libboost-all-dev or Boost dev packages)
- Note: Earlier stages install libboost-all-dev in a separate stage, but that package set isn’t present in the libtorrent build step
- Version mismatch info:
- No explicit Boost version mismatch shown; failure is due to missing Boost_INCLUDE_DIR during CMake configuration
- The libtorrent stage lacks Boost development packages that the project’s CMake expects
- Potential fixes (brief):
- Install Boost development packages in the libtorrent build step, e.g.:
apt-get update && apt-get install -y --no-install-recommends build-essential cmake ninja-build pkg-config libboost-all-dev ca-certificates git
- Align package sets across build stages so Boost headers are available when configuring libtorrent
- Actionable next steps:
- Add libboost-all-dev (or equivalent Boost dev packages) to the libtorrent build stage.
- Verify entrypoint.sh exists, is executable, and qbittorrent-nox runs in foreground.
- Consider avoiding large /usr copies across stages or ensure final runtime has required deps (OpenSSL, zlib, Boost) installed.FROM ubuntu:22.04 AS libtorrent_build
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build git ca-certificates \
libboost-all-dev zlib1g-dev libssl-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /tmp
# Build libtorrent from source (require >=2.0.10)
RUN git clone --depth 1 --branch v2.0.11 https://github.com/arvidn/libtorrent.git libtorrent && \
cd libtorrent && \
mkdir build && cd build && \
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_CXX_STANDARD=20 \
.. && \
cmake --build . && \
cmake --install . && \
ldconfig
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build pkg-config libssl-dev zlib1g-dev \
qt6-base-dev qt6-tools-dev-tools qt6-tools-dev qt6-svg-dev \
libboost-all-dev ca-certificates \
git curl \
&& rm -rf /var/lib/apt/lists/*
# Bring in prebuilt libtorrent
COPY --from=libtorrent_build /usr /usr
WORKDIR /qbittorrent
COPY . /qbittorrent
# Build qBittorrent from source without GUI (headless container)
RUN mkdir -p build && cd build \
&& cmake -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGUI=OFF \
-DWEBUI=ON \
-DSTACKTRACE=ON \
-DVERBOSE_CONFIGURE=OFF \
-DTESTING=OFF \
-DCMAKE_CXX_STANDARD=20 \
-DBOOST_ROOT=/usr \
.. \
&& cmake --build . \
&& cmake --install .
FROM ubuntu:22.04 AS runtime
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr /usr
# Entrypoint
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["qbittorrent-nox"]
- Exact error message and exit code: - E: Unable to locate package qt6-svg-dev - Exit code: 100 - Failing command/step: - [builder 2/6] RUN apt-get update && apt-get install -y --no-install-recommends build-essential cmake ninja-build pkg-config libssl-dev zlib1g-dev qt6-base-dev qt6-tools-dev-tools qt6-tools-dev qt6-svg-dev libboost-all-dev ca-certificates git curl && rm -rf /var/lib/apt/lists/* - Missing packages or files mentioned: - qt6-svg-dev (not found in apt sources) - Version mismatch / context: - Base image: ubuntu:22.04 (jammy) with digest referencing a specific sha256; no explicit version mismatch reported. The error arises because qt6-svg-dev isn’t available in the jammy repositories used by this build.
FROM ubuntu:22.04 AS libtorrent_build
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build git ca-certificates \
libboost-all-dev zlib1g-dev libssl-dev qtbase5-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /tmp
# Build libtorrent from source (require >=2.0.10)
RUN git clone --depth 1 --branch v2.0.11 https://github.com/arvidn/libtorrent.git libtorrent && \
cd libtorrent && \
mkdir build && cd build && \
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_CXX_STANDARD=20 \
.. && \
cmake --build . && \
cmake --install . && \
ldconfig
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build pkg-config libssl-dev zlib1g-dev \
qtbase5-dev qttools5-dev-tools qttools5-dev libqt5svg5-dev \
libboost-all-dev ca-certificates \
git curl \
&& rm -rf /var/lib/apt/lists/*
# Bring in prebuilt libtorrent
COPY --from=libtorrent_build /usr /usr
WORKDIR /qbittorrent
COPY . /qbittorrent
# Build qBittorrent from source without GUI (headless container)
RUN mkdir -p build && cd build \
&& cmake -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGUI=OFF \
-DWEBUI=ON \
-DSTACKTRACE=ON \
-DVERBOSE_CONFIGURE=OFF \
-DTESTING=OFF \
-DCMAKE_CXX_STANDARD=20 \
-DBOOST_ROOT=/usr \
.. \
&& cmake --build . \
&& cmake --install .
FROM ubuntu:22.04 AS runtime
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
libssl1.1 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr /usr
# Entrypoint
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["qbittorrent-nox"]
Concerns: The runtime stage installs libssl1.1, which is not available in Ubuntu 22.04 (jammy); this will likely cause the image build to fail., Copying /usr from the libtorrent_build stage into the final image can lead to potential library version mismatches or bloat; consider copying only required artifacts., Ensure the entrypoint script entrypoint.sh exists in the context; its presence is assumed but not shown in the snippet.
FROM ubuntu:22.04 AS libtorrent_build
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build git ca-certificates \
libboost-all-dev zlib1g-dev libssl-dev qtbase5-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /tmp
# Build libtorrent from source (require >=2.0.10)
RUN git clone --depth 1 --branch v2.0.11 https://github.com/arvidn/libtorrent.git libtorrent && \
cd libtorrent && \
mkdir build && cd build && \
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_CXX_STANDARD=20 \
.. && \
cmake --build . && \
cmake --install . && \
ldconfig
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build pkg-config libssl-dev zlib1g-dev \
qtbase5-dev qttools5-dev-tools qttools5-dev libqt5svg5-dev \
libboost-all-dev ca-certificates \
git curl \
&& rm -rf /var/lib/apt/lists/*
# Bring in prebuilt libtorrent
COPY --from=libtorrent_build /usr /usr
WORKDIR /qbittorrent
COPY . /qbittorrent
# Build qBittorrent from source without GUI (headless container)
RUN mkdir -p build && cd build \
&& cmake -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGUI=OFF \
-DWEBUI=ON \
-DSTACKTRACE=ON \
-DVERBOSE_CONFIGURE=OFF \
-DTESTING=OFF \
-DCMAKE_CXX_STANDARD=20 \
-DBOOST_ROOT=/usr \
.. \
&& cmake --build . \
&& cmake --install .
FROM ubuntu:22.04 AS runtime
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
libssl1.1 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr /usr
# Entrypoint
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["qbittorrent-nox"]
Summary (under 1500 chars): - Failing command/step: [runtime 2/5] RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates libssl1.1 && rm -rf /var/lib/apt/lists/* - Exact error messages and exit code: The step failed with: - E: Unable to locate package libssl1.1 - E: Couldn't find any package by glob 'libssl1.1' - E: Couldn't find any package by regex 'libssl1.1' exit code: 100 - Missing packages/files mentioned: - libssl1.1 is not available in the image's package sources. The error indicates libssl1.1 cannot be located. - Version mismatch / environment info: - Base image shown is Ubuntu 22.04 (Jammy). libssl1.1 is from an older OpenSSL 1.1 package set and is not provided in Ubuntu 22.04 (Jammy), which uses libssl3. The logs repeatedly reference jammy, confirming the Jammy (22.04) environment. - Context note: - The Dockerfile line attempting to install ca-certificates and libssl1.1 is incompatible with the Ubuntu 22.04 base image, causing apt to fail with exit code 100. A typical fix is to remove libssl1.1 and use a matching OpenSSL package (e.g., libssl3) or adjust the base image/version to one that provides libssl1.1.
FROM ubuntu:22.04 AS libtorrent_build
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build git ca-certificates \
libboost-all-dev zlib1g-dev libssl-dev qtbase5-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /tmp
# Build libtorrent from source (require >=2.0.10)
RUN git clone --depth 1 --branch v2.0.11 https://github.com/arvidn/libtorrent.git libtorrent && \
cd libtorrent && \
mkdir build && cd build && \
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_CXX_STANDARD=20 \
.. && \
cmake --build . && \
cmake --install . && \
ldconfig
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build pkg-config libssl-dev zlib1g-dev \
qtbase5-dev qttools5-dev-tools qttools5-dev libqt5svg5-dev \
libboost-all-dev ca-certificates \
git curl \
&& rm -rf /var/lib/apt/lists/*
# Bring in prebuilt libtorrent
COPY --from=libtorrent_build /usr /usr
WORKDIR /qbittorrent
COPY . /qbittorrent
# Build qBittorrent from source without GUI (headless container)
RUN mkdir -p build && cd build \
&& cmake -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGUI=OFF \
-DWEBUI=ON \
-DSTACKTRACE=ON \
-DVERBOSE_CONFIGURE=OFF \
-DTESTING=OFF \
-DCMAKE_CXX_STANDARD=20 \
-DBOOST_ROOT=/usr \
.. \
&& cmake --build . \
&& cmake --install .
FROM ubuntu:22.04 AS runtime
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr /usr
# Entrypoint
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["qbittorrent-nox"]
- VerifyBuild status: build_failed
- Concerns
- entrypoint.sh is referenced but not shown in this context; ensure it exists in the build context and handles runtime configuration correctly
- Final image copies the entire /usr from the builder stage; may bloat image; consider copying only required binaries/libs
- Build error (highlights)
- Exact error messages:
- The run failed with:
- CMake Error at CMakeLists.txt:547 (add_library):
Cannot find source file:
deps/try_signal/try_signal.cpp
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
- CMake Error at CMakeLists.txt:547 (add_library):
No SOURCES given to target: torrent-rasterbar
- CMake Generate step failed. Build files cannot be regenerated correctly.
- Final exit: 1
- Failing command/step
- libtorrent_build 4/4
- The exact command (from Dockerfile) that failed:
RUN git clone --depth 1 --branch v2.0.11 https://github.com/arvidn/libtorrent.git libtorrent && cd libtorrent && mkdir build && cd build && cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_STANDARD=20 .. && cmake --build . && cmake --install . && ldconfig
- Missing packages or files mentioned
- Missing source file: deps/try_signal/try_signal.cpp (causing “Cannot find source file” for torrent-rasterbar)
- The error indicates the libtorrent configuration cannot proceed due to that missing file, resulting in “No SOURCES given to target: torrent-rasterbar”
- Version and mismatch info
- LibTorrent source branch/tag: v2.0.11 (cloned with --branch v2.0.11)
- CMake configuration uses: -DCMAKE_CXX_STANDARD=20, -DBUILD_SHARED_LIBS=OFF
- Detected/OpenSSL/Boost context in prelude: OpenSSL 3.0.2, Boost 1.74.0, OpenMPI-related components; OpenSSL/OpenMPI dependencies installed during apt-get phase (unrelated to the specific failure but part of the build environment)
- Note: The log shows a detached HEAD for libtorrent and a full configure/build sequence prior to the failure
- What happened
- The libtorrent build started (cloning v2.0.11, creating a Ninja/CMake build). During CMake configuration, it could not locate deps/try_signal/try_signal.cpp, which caused a missing SOURCES error for the torrent-rasterbar target. This halted the CMake configuration and the overall build with exit code 1.FROM ubuntu:22.04 AS libtorrent_build
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build git ca-certificates \
libboost-all-dev zlib1g-dev libssl-dev qtbase5-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /tmp
# Build libtorrent from source (require >=2.0.10)
RUN git clone --depth 1 --branch v2.0.11 --recurse-submodules https://github.com/arvidn/libtorrent.git libtorrent && \
cd libtorrent && \
mkdir build && cd build && \
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_CXX_STANDARD=20 \
.. && \
cmake --build . && \
cmake --install . && \
ldconfig
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build pkg-config libssl-dev zlib1g-dev \
qtbase5-dev qttools5-dev-tools qttools5-dev libqt5svg5-dev \
libboost-all-dev ca-certificates \
git curl \
&& rm -rf /var/lib/apt/lists/*
# Bring in prebuilt libtorrent
COPY --from=libtorrent_build /usr /usr
WORKDIR /qbittorrent
COPY . /qbittorrent
# Build qBittorrent from source without GUI (headless container)
RUN mkdir -p build && cd build \
&& cmake -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGUI=OFF \
-DWEBUI=ON \
-DSTACKTRACE=ON \
-DVERBOSE_CONFIGURE=OFF \
-DTESTING=OFF \
-DCMAKE_CXX_STANDARD=20 \
-DBOOST_ROOT=/usr \
.. \
&& cmake --build . \
&& cmake --install .
FROM ubuntu:22.04 AS runtime
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr /usr
# Entrypoint
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["qbittorrent-nox"]
Summary (concise, actionable)
- Exact error message and exit code
- Error: Could NOT find Boost: Found unsuitable version "1.74.0", but required is at least "1.76" (found /usr/include, )
- Exit code: 1
- Failing command/step
- Step: The final build in builder stage 6
mkdir -p build && cd build && cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DGUI=OFF -DWEBUI=ON -DSTACKTRACE=ON -DVERBOSE_CONFIGURE=OFF -DTESTING=OFF -DCMAKE_CXX_STANDARD=20 -DBOOST_ROOT=/usr .. && cmake --build . && cmake --install .
- Context: This is after copying libtorrent, configuring qBittorrent, etc., but the failure is at the Boost check during CMake configure.
- Missing packages or files mentioned
- Boost version mismatch: The environment provides Boost 1.74.0 (found in /usr/include), but a minimum of 1.76 is required. No suitable Boost 1.76+ package appears to be installed in the image.
- Version mismatch information
- Found Boost version: 1.74.0
- Required: at least 1.76
- Source shows Boost headers/libs installed as 1.74.x (e.g., libboost-*, Boost headers under /usr/include), causing CMake to fail in FindBoost.
Notes
- The failure arises from a Boost version mismatch rather than a missing file, preventing the final cmake configuration for the headless qBittorrent build.FROM ubuntu:22.04 AS libtorrent_build
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build git curl ca-certificates \
zlib1g-dev libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Build Boost >= 1.76 from source to satisfy qBittorrent requirements
RUN set -eux; \
BOOST_VER=1_76_0; \
wget -O /tmp/boost_${BOOST_VER}.tar.gz https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_${BOOST_VER}.tar.gz; \
mkdir -p /tmp/boost_src; \
tar -xzf /tmp/boost_${BOOST_VER}.tar.gz -C /tmp/boost_src --strip-components=1; \
cd /tmp/boost_src; \
./bootstrap.sh; \
./b2 install --prefix=/usr -j$(nproc) --with-all; \
ldconfig
# Build libtorrent from source using Boost we just built
RUN git clone --depth 1 --branch v2.0.11 --recurse-submodules https://github.com/arvidn/libtorrent.git /tmp/libtorrent; \
cd /tmp/libtorrent; \
mkdir build; cd build; \
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_CXX_STANDARD=20 \
-DOPENSSL_ROOT_DIR=/usr \
-DBOOST_ROOT=/usr \
-DLibtorrentRasterbar_VERSION=2.0.11 \
..; \
cmake --build . -j$(nproc); \
cmake --install .; \
ldconfig
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build pkg-config libssl-dev zlib1g-dev \
libboost-all-dev ca-certificates \
qtbase5-dev libqt5svg5-dev \
git curl \
&& rm -rf /var/lib/apt/lists/*
# Bring in prebuilt libtorrent and Boost from the libtorrent_build stage
COPY --from=libtorrent_build /usr /usr
WORKDIR /qbittorrent
COPY . /qbittorrent
# Build qBittorrent from source without GUI (headless container)
RUN mkdir -p build && cd build \
&& cmake -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGUI=OFF \
-DWEBUI=ON \
-DSTACKTRACE=ON \
-DVERBOSE_CONFIGURE=OFF \
-DTESTING=OFF \
-DCMAKE_CXX_STANDARD=20 \
-DBOOST_ROOT=/usr \
.. \
&& cmake --build . \
&& cmake --install .
FROM ubuntu:22.04 AS runtime
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr /usr
RUN mkdir -p /qbittorrent
# Entrypoint
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["qbittorrent-nox"]
Concerns: The libtorrent_build stage downloads Boost using wget, but wget is not installed in that stage (only curl is installed). This will fail. Either install wget or use curl for the download., Relying on copying /usr from a builder stage into a runtime image can cause ABI compatibility issues or missing runtime libraries if not all required libs are copied (only /usr is copied; /lib and /lib64 from builder are not)., The final runtime image installs only ca-certificates; if qbittorrent-nox or its dependencies are not fully static, missing shared libraries (e.g., libstdc++, libssl) could cause runtime failures.
FROM ubuntu:22.04 AS libtorrent_build
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build git curl ca-certificates \
zlib1g-dev libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Install Boost from source to ensure >=1.76
RUN mkdir -p /tmp/boost_src; \
cd /tmp/boost_src; \
BOOST_VER=1_76_0; \
curl -L -o boost_${BOOST_VER}.tar.gz https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_${BOOST_VER}.tar.gz; \
tar -xzf boost_${BOOST_VER}.tar.gz -C /tmp/boost_src --strip-components=1; \
cd /tmp/boost_src; \
./bootstrap.sh; \
./b2 install --prefix=/usr -j$(nproc) --with-all
# Build libtorrent from source using Boost we just built
RUN git clone --depth 1 --branch v2.0.11 --recurse-submodules https://github.com/arvidn/libtorrent.git /tmp/libtorrent; \
cd /tmp/libtorrent; \
mkdir build; cd build; \
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_CXX_STANDARD=20 \
-DOPENSSL_ROOT_DIR=/usr \
-DBOOST_ROOT=/usr \
..; \
cmake --build . -j$(nproc); \
cmake --install .; \
ldconfig
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build pkg-config libssl-dev zlib1g-dev \
qtbase5-dev qttools5-dev-tools qttools5-dev libqt5svg5-dev \
libboost-all-dev ca-certificates \
git curl \
&& rm -rf /var/lib/apt/lists/*
# Bring in prebuilt libtorrent and Boost from the libtorrent_build stage
COPY --from=libtorrent_build /usr /usr
WORKDIR /qbittorrent
COPY . /qbittorrent
# Build qBittorrent from source without GUI (headless container)
RUN mkdir -p build && cd build \
&& cmake -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGUI=OFF \
-DWEBUI=ON \
-DSTACKTRACE=ON \
-DVERBOSE_CONFIGURE=OFF \
-DTESTING=OFF \
-DCMAKE_CXX_STANDARD=20 \
-DBOOST_ROOT=/usr \
-DJNI=ON \
.. \
&& cmake --build . \
&& cmake --install .
FROM ubuntu:22.04 AS runtime
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr /usr
# Entrypoint
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["qbittorrent-nox"]
Concerns
- Potential conflict: Boost is built from source in the libtorrent_build stage and libboost-all-dev is installed in the builder stage; may lead to duplicate headers/libs under /usr and version conflicts.
- Runtime image inherits many build-time dependencies by copying /usr from the builder stage; results in a large image. Recommend a more minimal runtime stage or copying only needed binaries/libs.
- JNI=ON is enabled for qBittorrent build. If JNI not required, this pulls in extra dependencies; verify it's actually needed.
Build error
- Exact error (exit code 127):
- ERROR: failed to build: failed to solve: process "/bin/sh -c mkdir -p /tmp/boost_src; cd /tmp/boost_src; BOOST_VER=1_76_0; curl -L -o boost_${BOOST_VER}.tar.gz https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_${BOOST_VER}.tar.gz; tar -xzf boost_${BOOST_VER}.tar.gz -C /tmp/boost_src --strip-components=1; cd /tmp/boost_src; ./bootstrap.sh; ./b2 install --prefix=/usr -j$(nproc) --with-all" did not complete successfully: exit code: 127
- Underlying errors:
- gzip: stdin: not in gzip format
- tar: Child returned status 1
- tar: Error is not recoverable: exiting now
- /bin/sh: 1: ./bootstrap.sh: not found
- /bin/sh: 1: ./b2: not found
Failing command/step
- libtorrent_build 3/4 RUN:
- mkdir -p /tmp/boost_src; cd /tmp/boost_src; BOOST_VER=1_76_0; curl -L -o boost_${BOOST_VER}.tar.gz https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_${BOOST_VER}.tar.gz; tar -xzf boost_${BOOST_VER}.tar.gz -C /tmp/boost_src --strip-components=1; cd /tmp/boost_src; ./bootstrap.sh; ./b2 install --prefix=/usr -j$(nproc) --with-all
Missing packages or files
- The Boost tarball download/extraction failed:
- gzip: stdin: not in gzip format
- tar: Child returned status 1
- As a result, bootstrap.sh and b2 are not found:
- /bin/sh: 1: ./bootstrap.sh: not found
- /bin/sh: 1: ./b2: not found
Version mismatch info
- BOOST_VER is set to 1_76_0 (Boost 1.76.0). The step attempts to download boost_1_76_0.tar.gz from boostorg.jfrog.io/release/1.76.0/source/boost_1_76_0.tar.gz, but the downloaded file is not a valid gzip, causing the subsequent build to fail.# Build qBittorrent from source for a headless container (no GUI)
FROM ubuntu:22.04 AS libtorrent
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build git curl ca-certificates \
libssl-dev zlib1g-dev libboost-all-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /tmp
RUN git clone --depth 1 --branch v2.0.11 --recurse-submodules https://github.com/arvidn/libtorrent.git /tmp/libtorrent \
&& cd /tmp/libtorrent \
&& mkdir build && cd build \
&& cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_CXX_STANDARD=20 \
.. \
&& cmake --build . -j$(nproc) \
&& cmake --install . \
&& ldconfig
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential cmake ninja-build pkg-config libssl-dev zlib1g-dev \
qtbase5-dev qttools5-dev-tools qttools5-dev libqt5svg5-dev \
libboost-all-dev ca-certificates \
git curl \
&& rm -rf /var/lib/apt/lists/*
# Bring in prebuilt libtorrent
COPY --from=libtorrent /usr /usr
WORKDIR /qbittorrent
COPY . /qbittorrent
# Build qBittorrent from source without GUI (headless container)
RUN mkdir -p build && cd build \
&& cmake -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DGUI=OFF \
-DWEBUI=ON \
-DSTACKTRACE=ON \
-DVERBOSE_CONFIGURE=OFF \
-DTESTING=OFF \
-DCMAKE_CXX_STANDARD=20 \
-DBOOST_ROOT=/usr \
.. \
&& cmake --build . \
&& cmake --install .
FROM ubuntu:22.04 AS runtime
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr /usr
# Entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["qbittorrent-nox"]
Build timed out after 600s