Skip to content

build: add reusable headless Docker build environment - #1475

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

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

Why the change

DSL DevKit can now be built and its UI tests run headlessly in a Linux container, on x86-64 or ARM64, without installing Eclipse, GTK or Xvfb on the host.

Special things to note

  • Kept to what is specific to Docker, so it needs no upkeep when the build changes: the image follows the latest Temurin 21 image, and the README runs the build commands from AGENTS.md instead of copying them.
  • Adds the 64bit_linux_aarch64 Maven profile (osgi.os=linux, osgi.ws=gtk, osgi.arch=aarch64), which Tycho needs to resolve SWT on Linux ARM64.
  • The image has no Maven of its own: the build uses ./mvnw, which pins the Maven version the project can build with.
  • unzip is installed because ./mvnw otherwise downloads the .tar.gz distribution, which doesn't match the wrapper's checksum.
  • tini is the image's entrypoint, so docker run needs no --init: as PID 1, xvfb-run can hang before starting Maven.
  • No CI workflow uses the image; it is for local and ad-hoc builds.
  • Checked with the full CI build from AGENTS.md in the container on native ARM64 (Apple Silicon), rerun on the final image: all tests pass, and Checkstyle, PMD, CPD and SpotBugs are clean.

Measured

Full CI build from AGENTS.md with -T 3C, on an Apple Silicon Mac (14 cores), with a native macOS build and a container build started at the same time and competing for the machine, two rounds:

Native macOS Container (Linux ARM64)
Round 1 10:26 10:03
Round 2 8:30 8:21

Both ran 490 tests with no failures and 2 skipped in each round. The container peaked at about 6 GB of memory and opened no windows on the host. The machine was under other load, so the absolute times are approximate; the comparison is between two builds under the same conditions. Each build running alone was not compared.

Change outline

 ddk-parent/pom.xml     # + 64bit_linux_aarch64 profile
+docker/Dockerfile      # eclipse-temurin:21-jdk-noble + GTK 3, librsvg, libXtst, tini, unzip, Xvfb
+docker/README.md       # build the image, run an AGENTS.md command in it, caveats

🤖 Generated with Claude Code

@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
@joaodinissf joaodinissf changed the title ci: add reusable headless Docker build environment build: add reusable headless Docker build environment Sep 22, 2026
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) <[email protected]>
Adds a small Linux image with Java 21, GTK 3 and Xvfb, so the full build
and the UI tests run headlessly on any machine with Docker, on x86-64 or
ARM64.

It holds only what is specific to Docker, so it needs no upkeep when the
build changes: the base image follows the latest Temurin 21 image, and
the README runs the build commands from AGENTS.md instead of copying
them. The image has no Maven of its own, since the build uses ./mvnw,
which pins the Maven version the project can build with. unzip is
installed because ./mvnw otherwise downloads the .tar.gz distribution,
which doesn't match the wrapper's checksum. tini is the entrypoint,
because xvfb-run can hang before starting Maven when it runs as PID 1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]>

This branch has not been deployed

No deployments
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