Files
qt6-migration-pipeline/app/Dockerfile
T
torstenandCopilot 80f5859326
Qt6 Migration CI / migrate (push) Waiting to run
Update migration status and Dockerfile for Qt6/RTI 7.7 migration
- Updated MIGRATION_STATUS.md with current build status
- Added qtlocation and qtpositioning modules to Dockerfile
- Fixed RTI target collision issues in CMakeLists.txt
- Fixed Grantlee template namespace resolution for DTC generation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: 01M1BTYT8881P8P994NSAMC6R5
2026-08-31 13:58:28 +02:00

113 lines
4.0 KiB
Docker

FROM ubuntu:26.04
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
QT_VERSION=6.10.2 \
QT_ARCH=linux_gcc_64 \
QT_BASE_DIR=/opt/Qt \
QT_ROOT=/opt/Qt/6.10.2/gcc_64 \
Qt6_ROOT=/opt/Qt/6.10.2/gcc_64 \
EXTERNAL_DIR=/repo/external \
CMAKE_PREFIX_PATH=/usr/local:/opt/Qt/6.10.2/gcc_64:/repo/external \
PATH=/opt/Qt/6.10.2/gcc_64/bin:$PATH
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
sudo \
git \
cmake \
ninja-build \
clang \
build-essential \
gnupg \
curl \
jq \
openssh-client \
pkg-config \
libgl1-mesa-dev \
libxkbcommon-x11-0 \
libfontconfig1 \
libdbus-1-3 \
libpulse0 \
libxcb-glx0 \
libxcb-cursor0 \
libpq-dev \
libbz2-dev \
libpoppler-dev \
libpoppler-qt6-dev \
libboost-dev \
libvlc-dev \
vlc-plugin-base \
libqt6qml6 \
libqt6qmlmodels6 \
libqt6quick6 \
libkf6texttemplate-dev \
unzip \
python3 \
python3-venv \
python3-pip \
&& ln -sf /usr/bin/python3 /usr/local/bin/python3 \
&& ln -sf /usr/bin/python3 /usr/local/bin/python \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt /app/requirements.txt
RUN python3 -m venv /opt/venv \
&& /opt/venv/bin/pip install --upgrade pip setuptools wheel \
&& /opt/venv/bin/pip install -r /app/requirements.txt aqtinstall \
&& mkdir -p "${QT_BASE_DIR}" \
&& /opt/venv/bin/python -m 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}" \
&& test -f "${QT_ROOT}/lib/cmake/Qt6/Qt6Config.cmake"
# Build and install Log4Qt via script in /app (keeps Dockerfile small)
COPY build_log4qt.sh /app/build_log4qt.sh
COPY build_grantlee.sh /app/build_grantlee.sh
COPY build_kdreports.sh /app/build_kdreports.sh
RUN /app/build_log4qt.sh
# Install additional external dependencies required by Lts modules
# Attempt to install system packages first; then build Grantlee and KDReports from source if not available
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
libgeographiclib-dev \
libssl-dev \
libxml2-dev \
libicu-dev \
libqt6svg6-dev \
libqt6webkit6-dev || true; \
# Try to install Grantlee / KDReports via apt (preferred); ignore failures
apt-get install -y --no-install-recommends libgrantlee5 libgrantlee5-dev libkdreports-dev || true; \
# Install GoogleTest dev packages so CMake can find GTest; build if apt provides sources
apt-get install -y --no-install-recommends libgtest-dev libgmock-dev || true; \
# Build Grantlee and KDReports via scripts in /app if apt packages not available
/app/build_grantlee.sh || true; \
/app/build_kdreports.sh || true; \
# If libgtest-dev provided sources, build+install them via script
/app/build_gtest.sh || true; \
# geographiclib already installed via apt; RTI and ArcGIS are proprietary and installed externally
echo "Note: RTI Connext and ArcGIS Maps SDK are expected to be provided under /repo/external (e.g. /repo/external/rti_connext_dds-7.7.0 and /repo/external/ArcGIS)."
# Add RPM/rpmbuild tools so make_rpm.py can run inside the image when requested
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends rpm rpm-build rpmdevtools || true; \
rm -rf /var/lib/apt/lists/*
# Copy helper scripts (do not execute heavy source builds here)
COPY prepare_rpm.sh install_arcgis.sh build_geographiclib.sh install_rti.sh /app/
RUN chmod +x /app/*.sh || true
COPY . /app
CMD ["python3.11", "run_migration.py", "--help"]