If you have downloaded the sample project and unzipped it, there is a build.sh script that compiles the Java filters and builds the Docker image.
If you're interested in how this works, look in the directory called docker, which contains a Dockerfile that builds a Docker image that includes your Java filter(s).
The Dockerfile looks like:
FROM galliumdata/gallium-data-engine:1.7.1-1468
LABEL com.galliumdata.docker.version="Gallium Data 1.7.1-1468 with Java filter"
COPY --chown=galliumdata:galliumdata java-filter-test-1.jar /galliumdata/jars/
ADD repo.tar /galliumdata/metarepo/filter_types/
USER root
RUN chown -R galliumdata:galliumdata /galliumdata/metarepo
As you can see, the Dockerfile starts from a standard Gallium Data image, and simply adds two things:
the jar file containing your Java filter(s)
the JSON files describing your Java filter(s)
You may also choose to include a predefined repository in this image -- see the documentation on that for details.
Once the Docker image is built, you can run it like any other Gallium Data image.