116 lines
4.0 KiB
Docker
116 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 \
|
|
postgresql-server-dev-all \
|
|
libbz2-dev \
|
|
libpoppler-dev \
|
|
libpoppler-qt6-dev \
|
|
libboost-dev \
|
|
libvlc-dev \
|
|
vlc-plugin-base \
|
|
libqt6qml6 \
|
|
libqt6qmlmodels6 \
|
|
libqt6quick6 \
|
|
qt6-base-dev \
|
|
extra-cmake-modules \
|
|
libkf6texttemplate-dev \
|
|
qt6-tools-dev-tools \
|
|
qt6-tools-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 app/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 app/build_log4qt.sh /app/build_log4qt.sh
|
|
COPY app/build_kdreports.sh /app/build_kdreports.sh
|
|
RUN /app/build_log4qt.sh
|
|
|
|
|
|
# Install additional external dependencies required by Lts modules
|
|
# KTextTemplate (Grantlee5 replacement) already installed above with qt6-base-dev and extra-cmake-modules
|
|
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; \
|
|
# Install KDReports via apt (preferred); ignore failures
|
|
apt-get install -y --no-install-recommends 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 KDReports via script in /app if apt packages not available
|
|
/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 app/prepare_rpm.sh app/install_arcgis.sh app/build_geographiclib.sh app/install_rti.sh app/build_gtest.sh /app/
|
|
RUN chmod +x /app/*.sh || true
|
|
|
|
COPY . /app
|
|
|
|
CMD ["python3.11", "run_migration.py", "--help"]
|