96 lines
3.3 KiB
Markdown
96 lines
3.3 KiB
Markdown
# Ubuntu 24.04/26.04 Docker Build Environment for Legatus LTS
|
|
|
|
## ⚠️ Wichtiger Hinweis (2026-08-18)
|
|
|
|
**Ubuntu 24.04 und 26.04 haben KEINE Qt6-Pakete in den Standard-Repositories.**
|
|
|
|
Nach umfassender Untersuchung:
|
|
- `apt-cache search qt6` liefert 0 Ergebnisse auf Ubuntu 24.04/26.04
|
|
- beinerji/opt-qt-6.8.2-noble PPA ist unzuverlässig/defekt
|
|
- Qt.io bietet keine einfachen tar.xz-Downloads für CI-Automatisierung
|
|
|
|
**Empfohlene Lösung für CI**: Verwende **openSUSE Leap 15.5** mit KDE:Qt6 Repository (siehe `Dockerfile-opensuse-qt6.dockerfile`).
|
|
|
|
Die Ubuntu-Infrastruktur (`Dockerfile-ubuntu26.04.dockerfile`, `jenkins_builder_ubuntu26.sh`, `make_rpm_ubuntu26.py`) ist für zukünftige Ubuntu-Unterstützung vorbereitet.
|
|
|
|
---
|
|
|
|
## Qt6 Installation Options
|
|
|
|
Ubuntu 24.04 hat keine Qt6-Pakete in den Standard-Repos. Es gibt drei Optionen:
|
|
|
|
### Option 1: Qt von Host mounten (Empfohlen für lokale Entwicklung)
|
|
|
|
```bash
|
|
# Qt6 auf Host installieren (z.B. unter /opt/Qt)
|
|
# Dann Docker mit mount starten:
|
|
docker run --rm -v $(pwd):/repo -v /opt/Qt:/opt/Qt \
|
|
-e CMAKE_PREFIX_PATH=/opt/Qt/6.8.2/gcc_64/lib/cmake \
|
|
-e PATH=/opt/Qt/6.8.2/gcc_64/bin:$PATH \
|
|
legatus-ubuntu24.04:latest
|
|
```
|
|
|
|
### Option 2: Qt Offline Installer im Dockerfile
|
|
|
|
```dockerfile
|
|
# Qt Account Credentials als Build-Args
|
|
ARG QT_USERNAME
|
|
ARG QT_PASSWORD
|
|
|
|
# Installer herunterladen und im silent mode installieren
|
|
RUN wget -q https://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run && \
|
|
chmod +x qt-unified-linux-x64-online.run && \
|
|
echo "[Defaults]" > qt.conf && \
|
|
echo "CredentialsId=QtAccount" >> qt.conf && \
|
|
./qt-unified-linux-x64-online.run --script qt-installer.qs && \
|
|
rm qt-unified-linux-x64-online.run qt.conf
|
|
```
|
|
|
|
### Option 3: Pre-built Docker Image verwenden
|
|
|
|
Ein separates Docker-Image mit vorinstalliertem Qt6 verwenden:
|
|
```bash
|
|
docker pull <your-registry>/legatus-qt6-ubuntu24.04:latest
|
|
```
|
|
|
|
### Option 4: openSUSE Leap Docker (bereits funktionierend)
|
|
|
|
Das bestehende `Dockerfile-opensuse-leap.dockerfile` verwendet openSUSE mit Qt6 aus den offiziellen Repos:
|
|
```bash
|
|
docker build -t legatus-opensuse:latest -f jenkins/Dockerfile-opensuse-leap.dockerfile jenkins/
|
|
```
|
|
|
|
## Build Dependencies
|
|
|
|
Dieses Dockerfile installiert alle notwendigen Build-Dependencies außer Qt6:
|
|
- build-essential, cmake, ninja-build
|
|
- libboost-all-dev, libgeographic-dev
|
|
- libssl-dev, libcurl4-openssl-dev
|
|
- clang-tidy, clang-format
|
|
|
|
## Verwendung
|
|
|
|
```bash
|
|
# Docker Image bauen (ohne Qt6)
|
|
docker build -t legatus-ubuntu24.04:latest -f Dockerfile-ubuntu26.04.dockerfile .
|
|
|
|
# Mit Qt6 vom Host mounten
|
|
docker run --rm -v $(pwd):/repo -v /opt/Qt:/opt/Qt \
|
|
-e CMAKE_PREFIX_PATH=/opt/Qt/6.8.2/gcc_64/lib/cmake \
|
|
legatus-ubuntu24.04:latest \
|
|
cmake -S /repo/qt-migration-legatus/qt6-after/qt6-migrated-legatus \
|
|
-B /repo/build -DCMAKE_BUILD_TYPE=Debug
|
|
|
|
# Build ausführen
|
|
docker run --rm -v $(pwd):/repo -v /opt/Qt:/opt/Qt \
|
|
-e CMAKE_PREFIX_PATH=/opt/Qt/6.8.2/gcc_64/lib/cmake \
|
|
legatus-ubuntu24.04:latest \
|
|
cmake --build /repo/build --parallel $(nproc)
|
|
```
|
|
|
|
## Hinweis für CI/CD
|
|
|
|
Für Jenkins/GitLab CI wird empfohlen:
|
|
1. Ein Basis-Image mit Qt6 zu bauen und in einer Registry zu speichern
|
|
2. Oder Qt6 auf dem CI-Host zu installieren und ins Docker-Image zu mounten
|
|
3. Oder das bewährte openSUSE-Image zu verwenden |