Split the prebuilt-image recipe out of new_docker_build.sh into a Dockerfile
- Dockerfile: the prebuilt build image recipe (Ubuntu 26.04 + apt deps + aqtinstall Qt6 + KDReports), parameterized via ARG APT_PACKAGES / QT_VERSION / QT_ARCH / QT_BASE_DIR. - new_docker_build.sh: build_prebuilt_image() now runs docker build -f Dockerfile with the package list and Qt settings passed as build args, using an empty build context (the Dockerfile has no COPY/ADD).
This commit is contained in:
1 parent
23cf641d36
commit
65ca0d8b5e
2 files changed
+71
-48
No files matched your search
@@ -0,0 +1,52 @@
|
||||
# Prebuilt build image for the release validation-scope branch
|
||||
# (Ubuntu 26.04 + Qt6 + all dependencies for the legatus release build).
|
||||
#
|
||||
# Built by new_docker_build.sh --build-prebuilt-image, which passes the
|
||||
# package list and Qt settings as build args (see build_prebuilt_image()).
|
||||
|
||||
FROM ubuntu:26.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
ARG APT_PACKAGES
|
||||
ARG QT_VERSION=6.10.2
|
||||
ARG QT_ARCH=linux_gcc_64
|
||||
ARG QT_BASE_DIR=/opt/Qt
|
||||
|
||||
RUN apt-get update -qq && \
|
||||
apt-get install -y -qq \
|
||||
${APT_PACKAGES} \
|
||||
libqt6svg6-dev \
|
||||
libgtest-dev \
|
||||
libgmock-dev \
|
||||
python3-pip && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Qt6 packages via aqtinstall
|
||||
# Note: QtWebKit is deprecated in Qt6, use QtWebEngine instead
|
||||
# KDReports is installed via aqtinstall or built from source if needed
|
||||
# Note: qtsvg is NOT available via aqtinstall - it's provided by libqt6svg6-dev apt package
|
||||
RUN pip3 install --break-system-packages --quiet aqtinstall && \
|
||||
aqt install-qt linux desktop ${QT_VERSION} ${QT_ARCH} \
|
||||
-m qtmultimedia qtserialport qtimageformats qtwebsockets qtwebengine \
|
||||
qtpdf qtwebview qt5compat qtwebchannel qtpositioning qtlocation qtsensors \
|
||||
--outputdir ${QT_BASE_DIR} && \
|
||||
rm -rf /root/.cache/Aqt
|
||||
|
||||
# Install KDReports from source (apt package not available in Ubuntu 22.04/26.04)
|
||||
# Try apt install first (will fail), then build from KDAB GitHub mirror
|
||||
RUN apt-get install -y -qq libkdreports-dev 2>/dev/null || \
|
||||
(git clone --depth 1 https://github.com/KDAB/KDReports.git /tmp/KDReports && \
|
||||
cd /tmp/KDReports && \
|
||||
mkdir build && cd build && \
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_PREFIX_PATH=${QT_BASE_DIR} .. && \
|
||||
make -j$(nproc) && \
|
||||
make install && \
|
||||
cd / && rm -rf /tmp/KDReports)
|
||||
|
||||
# Legacy sources include <KDReports/...> but the Qt6 package installs headers flat
|
||||
# under /usr/local/include/KDReports-qt6 - alias the directory so the prefixed
|
||||
# includes resolve through the default /usr/local/include search path.
|
||||
RUN ln -sfn KDReports-qt6 /usr/local/include/KDReports
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
Reference in new issue
Block a user