Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions ddk-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,21 @@
<osgi.arch>x86_64</osgi.arch>
</properties>
</profile>
<profile>
<activation>
<os>
<name>linux</name>
<arch>aarch64</arch>
<family>unix</family>
</os>
</activation>
<id>64bit_linux_aarch64</id>
<properties>
<osgi.os>linux</osgi.os>
<osgi.ws>gtk</osgi.ws>
<osgi.arch>aarch64</osgi.arch>
</properties>
</profile>
<profile>
<id>macosx</id>
<activation>
Expand Down
13 changes: 13 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# No Maven in the image: the build uses ./mvnw, which pins the Maven version the project can build with.
FROM eclipse-temurin:21-jdk-noble

# Native libraries for SWT on GTK 3 and the JDK's AWT, a virtual display for the UI tests, tini as PID 1, and unzip
# for ./mvnw, which otherwise downloads the .tar.gz that doesn't match its checksum.
RUN apt-get update \
&& apt-get install -y --no-install-recommends libgtk-3-0t64 librsvg2-common libxtst6 tini unzip xvfb \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /workspace

# Without an init process, xvfb-run runs as PID 1 and can hang before starting Maven.
ENTRYPOINT ["/usr/bin/tini", "--"]
25 changes: 25 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# DDK Docker build environment

A Linux image with Java, GTK and Xvfb, for running the full build and the UI tests headlessly on any machine with Docker (x86-64 or ARM64).

Build the image from the repository root:

```bash
docker build --pull -t ddk-build docker
```

Run any build command from [AGENTS.md](../AGENTS.md#build-commands) in it, for example the full CI build, which already starts with `xvfb-run`:

```bash
docker run --rm \
--mount "type=bind,source=${PWD},target=/workspace" \
--mount "type=volume,source=ddk-m2,target=/root/.m2" \
ddk-build \
<command from AGENTS.md>
```

In PowerShell, use `$PWD.Path` for the source and backticks for the line breaks, and quote `-D` arguments (`'-DskipTests'`).

- **Use a full clone, not a linked worktree:** a worktree's `.git` file points outside the mount, and Tycho's build qualifier then fails with `repository not found`.
- The `ddk-m2` volume keeps Maven and p2 downloads between runs; on a machine that builds both architectures, use one volume per architecture.
- The container runs as root, so on a Linux host the build output in the checkout is owned by root.