Adapt Qt6 framework Dockerfile for air-gapped environment
- Use internal Nexus repositories for APT and PyPI - Add proxy configuration with internal IP ranges - Install CA certificates and signing keys from internal server - Create users ctc (uid 1445) and rme (uid 1001) - Maintain Qt6 installation via aqtinstall with Python venv - Add Qt6 SVG support via libqt6svg6-dev - Configure runtime mount points for ArcGIS and RTI - Follow Ubuntu 26.04 standards from reference Dockerfile Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Entire-Checkpoint: 01M6PC9GY7GJ86XMK0F4J1PDVW
This commit is contained in:
1 file changed
+132
-26
@@ -1,41 +1,147 @@
|
||||
# Qt6 Framework Installation
|
||||
# Qt6 Framework Installation for Air-Gapped Environment
|
||||
FROM harbor.sl.defence-elec.de/proxydockerhub/library/ubuntu:26.04
|
||||
|
||||
ARG RME_USERPASS=ctc
|
||||
ARG RME_ADMINSRV=10.198.80.75
|
||||
ARG RME_PROJECT=guez
|
||||
|
||||
# Air-gapped Proxy Configuration
|
||||
ARG http_proxy="http://10.198.80.130:3128"
|
||||
ARG no_proxy="localhost,127.0.0.1,defence-elec.de,.defence-elec.de,sl.defence-elec.de,10.198.80.0/23,192.168.133.0/24,141.200.0.0/16,10.184.0.0/15,10.199.101.35,10.199.101.36,10.199.101.158"
|
||||
ARG HTTP_PROXY=${http_proxy}
|
||||
ARG https_proxy=${http_proxy}
|
||||
ARG HTTPS_PROXY=${http_proxy}
|
||||
ARG NO_PROXY=${no_proxy}
|
||||
|
||||
# Pip Configuration for internal Nexus PyPI proxy
|
||||
ENV PIP_INDEX_URL="http://remote-repo.sl.defence-elec.de:8081/repository/proxypipy/" \
|
||||
PIP_TRUSTED_HOST="remote-repo.sl.defence-elec.de" \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PIP_NO_CACHE_DIR=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1
|
||||
|
||||
# Qt6 Configuration
|
||||
ENV QT_VERSION=6.10.2 \
|
||||
QT_ARCH=linux_gcc_64 \
|
||||
QT_BASE_DIR=/opt/Qt \
|
||||
QT_ROOT=/opt/Qt/6.10.2/gcc_64
|
||||
|
||||
# OS and PATH Configuration
|
||||
ENV DEBIAN_FRONTEND=noninteractive \
|
||||
LANG=C.UTF-8 \
|
||||
LC_ALL=C.UTF-8 \
|
||||
Qt6_ROOT=${QT_ROOT} \
|
||||
CMAKE_PREFIX_PATH=/usr/local:${QT_ROOT} \
|
||||
LD_LIBRARY_PATH=${QT_ROOT}/lib \
|
||||
PATH=${QT_ROOT}/bin:$PATH
|
||||
|
||||
LABEL maintainer="Legatus Team"
|
||||
LABEL description="Qt6 framework installation via aqtinstall"
|
||||
LABEL description="Qt6 framework installation via aqtinstall for air-gapped environment"
|
||||
LABEL version="6.10.2"
|
||||
LABEL author="Thore Poggenburg (updated for Qt6 on Ubuntu 26.04)"
|
||||
LABEL project=${RME_PROJECT}
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
# Use Bash with safe pipe handling
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
ARG HTTP_PROXY=""
|
||||
ARG HTTPS_PROXY=""
|
||||
ARG NO_PROXY="localhost,127.0.0.1,.sl.defence-elec.de"
|
||||
# Replace original repositories with Nexus proxies
|
||||
RUN echo : > /etc/apt/sources.list && \
|
||||
echo -e "Types: deb\n\
|
||||
URIs: http://remote-repo.sl.defence-elec.de:8081/repository/ubuntu\n\
|
||||
Suites: resolute resolute-updates resolute-backports\n\
|
||||
Components: main restricted universe multiverse\n\
|
||||
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg\n\
|
||||
\n\
|
||||
Types: deb\n\
|
||||
URIs: http://remote-repo.sl.defence-elec.de:8081/repository/ubuntu-security\n\
|
||||
Suites: resolute-security\n\
|
||||
Components: main restricted universe multiverse\n\
|
||||
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg" > /etc/apt/sources.list.d/ubuntu.sources
|
||||
|
||||
ENV http_proxy=${HTTP_PROXY}
|
||||
ENV https_proxy=${HTTPS_PROXY}
|
||||
ENV no_proxy=${NO_PROXY}
|
||||
|
||||
# Install Python and aqtinstall
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
python3 python3-pip ca-certificates \
|
||||
# Create users (install openssl first for password hashing)
|
||||
RUN apt-get update && apt-get install -y openssl \
|
||||
&& groupadd ctc -g 1445 || true \
|
||||
&& groupadd rme -g 1001 || true \
|
||||
&& useradd -d /shd/CTC/TOOLS -u 1445 -g ctc -m -p $(openssl passwd -5 ${RME_USERPASS}) ctc || true \
|
||||
&& useradd -d /home/rme -u 1001 -g rme -m -p $(openssl passwd -5 ${RME_USERPASS}) rme || true \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN pip3 install --break-system-packages --quiet aqtinstall
|
||||
# Install internal CA certificates and signing keys
|
||||
RUN curl -fsSL http://${RME_ADMINSRV}/rme/deb_and_rpm_signage_key.pub --output /etc/apt/keyrings/deb_and_rpm_signage_key.asc \
|
||||
&& curl -fsSL http://${RME_ADMINSRV}/rme/SL-Netz.crt --output /usr/local/share/ca-certificates/SL-Netz.crt \
|
||||
&& update-ca-certificates
|
||||
|
||||
# Install Qt6
|
||||
ARG QT_VERSION=6.10.2
|
||||
ARG QT_MODULES="qtmultimedia qtserialport qtimageformats qtwebsockets qtwebengine qtpdf qtwebview qt5compat qtwebchannel qtpositioning qtlocation qtsensors"
|
||||
WORKDIR /app
|
||||
|
||||
RUN aqt install-qt linux desktop ${QT_VERSION} linux_gcc_64 \
|
||||
-m ${QT_MODULES} \
|
||||
--outputdir /opt/Qt \
|
||||
&& ln -sfn /opt/Qt/${QT_VERSION}/gcc_64/bin/* /usr/local/bin/
|
||||
# Install base development tools and Qt6 dependencies
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
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 \
|
||||
libgeographiclib-dev \
|
||||
libbotan-3-dev \
|
||||
libssl-dev \
|
||||
libxml2-dev \
|
||||
libicu-dev \
|
||||
libqt6svg6-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/*
|
||||
|
||||
ENV QT_HOME=/opt/Qt/${QT_VERSION}/gcc_64
|
||||
ENV PATH=${QT_HOME}/bin:${PATH}
|
||||
ENV CMAKE_PREFIX_PATH=${QT_HOME}/lib/cmake
|
||||
# Setup Python virtual environment and install aqtinstall
|
||||
RUN python3 -m venv /opt/venv \
|
||||
&& /opt/venv/bin/pip install --upgrade pip setuptools wheel \
|
||||
&& /opt/venv/bin/pip install aqtinstall
|
||||
|
||||
# Verify installation
|
||||
RUN qmake6 --version && qmake6 --version | grep -q "${QT_VERSION}"
|
||||
# Install Qt6 via aqtinstall with required modules
|
||||
# Note: Qt6Location requires Qt6Positioning as dependency
|
||||
RUN set -eux; \
|
||||
mkdir -p "${QT_BASE_DIR}" \
|
||||
&& /opt/venv/bin/python -m aqt install-qt linux desktop "${QT_VERSION}" "${QT_ARCH}" \
|
||||
-m qtmultimedia qtserialport qtimageformats qtwebsockets qtpdf qtwebview qtlocation qtpositioning qt5compat qtwebchannel qtsensors \
|
||||
--outputdir "${QT_BASE_DIR}" \
|
||||
&& test -f "${QT_ROOT}/lib/cmake/Qt6/Qt6Config.cmake"
|
||||
|
||||
# ArcGIS Maps SDK for Qt will be mounted at runtime if needed:
|
||||
# docker run -v /path/to/ArcGIS:/opt/ArcGIS ...
|
||||
# Set ARCGIS_SDK_ROOT for discovery (will be used if mounted)
|
||||
ENV ARCGIS_SDK_ROOT=/opt/ArcGIS/MapsSDK_Qt_300.0.0
|
||||
|
||||
# RTI Connext DDS (proprietary) should be mounted at runtime:
|
||||
# docker run -v /path/to/rti:/opt/RTI ...
|
||||
# Set DDS_PATH for RTI discovery (will be used if RTI is mounted)
|
||||
ENV DDS_PATH=/opt/RTI
|
||||
|
||||
# Cleanup
|
||||
RUN apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
USER ctc
|
||||
WORKDIR /shd/CTC/TOOLS
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
Reference in new issue
Block a user