Skip to content

ci: add reusable headless Docker build environment - #1475

Open
joaodinissf wants to merge 2 commits into
dsldevkit:masterfrom
joaodinissf:wip/docker-build-env
Open

ci: add reusable headless Docker build environment#1475
joaodinissf wants to merge 2 commits into
dsldevkit:masterfrom
joaodinissf:wip/docker-build-env

Conversation

@joaodinissf

@joaodinissf joaodinissf commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Adds a reusable Docker image for building and testing DSL DevKit headlessly in a Linux container, plus the Tycho target-environment profile required on Linux ARM64.

This supersedes #1501: the first commit contains the ARM64 profile from that PR, and the second adds the tested container environment and documentation.

What it adds

  • 64bit_linux_aarch64 Maven profile with osgi.os=linux, osgi.ws=gtk, and osgi.arch=aarch64.
  • A Maven 3.9.16 / Eclipse Temurin 21 Noble image with the minimal practical GTK 3, SVG loader, Xvfb, and XTest runtime dependencies.
  • Tested instructions for Windows with Docker Desktop, Linux/macOS, ARM64, Maven/p2 caching, linked Git worktrees, registry mirrors, and TLS-intercepting networks.
  • A MAVEN_IMAGE build argument, replacing the previous copied Dockerfile.local workaround.

Local verification

All Maven invocations used -T 3C.

Linux AMD64 on Windows

  • Docker Desktop Linux engine on an x86-64 Windows host.
  • Full 64-module CI-equivalent build completed successfully under Xvfb.
  • Checkstyle, PMD, CPD, and SpotBugs completed with no violations.
  • Surefire aggregate: 333 tests, 0 failures, 0 errors, 2 skipped; 348 concrete <testcase> elements.
  • The repository's Surefire report validator completed successfully.

Linux ARM64 on Windows

  • Built and executed with --platform linux/arm64 under Docker Desktop emulation.
  • Maven activated 64bit_linux_aarch64 and Tycho launched the Eclipse test runtime as linux/gtk/aarch64.
  • All 64 modules and the complete headless Eclipse/SWT test suite completed successfully.
  • Surefire aggregate: 333 tests, 0 failures, 0 errors, 2 skipped; report validation succeeded.
  • The reactor took about 1h35m under QEMU. Tycho's default 1,800-second test-runtime timeout is therefore insufficient for emulation; the documented ARM command uses -Dtest.timeout=7200. Native ARM64 should be substantially faster.

The exact final AMD64 and ARM64 images also launched an SWT Display and Shell under Xvfb.

Image cleanup

The original Dockerfile explicitly requested 20 packages, including redundant transitive dependencies and unused GTK4/ALSA fallback packages. The final image explicitly installs four:

  • libgtk-3-0t64
  • librsvg2-common
  • libxtst6
  • xvfb

Compared with the original image, this reduces the AMD64 image by 13.35 MiB and the ARM64 image by 14.70 MiB while retaining the required SWT/GTK behavior.

joaodinissf and others added 2 commits August 26, 2026 09:54
Add a Maven profile activated on linux/aarch64 that sets osgi.os=linux,
osgi.ws=gtk, osgi.arch=aarch64. Without it, Tycho falls back to the pom's
default win32 target environment on arm64 Linux and builds an unlaunchable
test runtime (NoClassDefFoundError: org.eclipse.swt.SWTError, exit code 13),
so SWT/UI tests cannot run in an arm64 container.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add docker/Dockerfile (Maven + Temurin 21 base plus Xvfb and the GTK/X11
libraries Eclipse SWT and AWT require) and a README documenting how to run
the full verify suite headlessly in a container. Runs --init so xvfb-run is
not PID 1, and mounts a persistent .m2 volume to cache p2/Maven downloads
between runs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@joaodinissf
joaodinissf force-pushed the wip/docker-build-env branch from cccf372 to 69c6ead Compare August 26, 2026 13:23
@joaodinissf
joaodinissf marked this pull request as ready for review August 26, 2026 13:38
@joaodinissf
joaodinissf enabled auto-merge (rebase) August 26, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant