This is a pre-made Docker image which includes all the needed configuration needed for properly executing JavaFX integration tests in CI environments.
- Linux base: Same as the parent image, currently Ubuntu
- Parent image: AdoptOpenJDK/maven-openjdk11:latest
- Java version: 11
- Provider: AdoptOpenJDK
The image executes maven with the given arguments on the folder /root/build
, so an example would be:
docker run -v /my/project:/root/build -it tristandeloche/easyfxml-docker:1.2.3 clean install
Running JavaFX mostly requires the X Virtual FrameBuffer (xvfb
), but it is far from enough for most features and workflows.
This images sets up basically all of what you might want.
It is invoked using the entrypoint easyfxml-maven (which is on the path inside the image).
That script wraps maven invocations with xvfb-run
to ensure set-up and teardown of the
virtual desktop environment when building and most importantly testing.
Another few notable aspects are the installation of git (which your maven build might) rely on for various aspects including resource filtering and releasing.
Finally, dbus-x11
and gtk+{2,3}
are some of the needed Linux runtime dependencies for
various non-headless JavaFX features.
It is strictly a non-goal to have small images, which is why things like alpine base and minimal image size footprint have voluntarily not been considered. Indeed it is not expected to be stored and shared images, but rather only use to have an easier time running integration tests.
You must also be careful about the fact that JavaFX does not support cross-compilation, so releasing full applications automatically is not enabled by this image in any way.