This is a repository for Java Docker base images used for running JVM applications.
You can find the images in our Docker Hub repository.
The Docker build files for these images are generated by
fish-pepper, a sophisticated
template system for generation Docker builds. fish-pepper allows
the composition of various building blocks, so that parametrized Docker
builds are easily possible.
The Java base images come in different flavours:
- Based on CentOS 7 or Alpine Linux (experimental) or Red Hat Universal Base Image or Ubuntu 20.04
- OpenJDK 17 only (for previous versions refer to original repository maintained by Fabric8 team)
- As JDK (Java Developer Toolkit) or as JRE (Java Runtime Environment)
All images add the following features:
- agent-bond is included which combines Jolokia and jmx_exporter
- A startup script run-java.sh is included which transparently starts Java application provided as FAT-jar or traditionally with a bunch of jar dependencies.
How to use these images and what environment variables can be used are described in the associated README files.
If using nix and direnv, it will auto-setup a ready to use environment to start hacking quickly:
$ direnv allowAnd after that:
$ justIt will display the list of all available commands and shortcuts:
just --list
Available recipes:
build
b # alias for `build`
default # Lists all available commands
fish-pepper *ARGS
fp *ARGS # alias for `fish-pepper`
fmt
f # alias for `fmt`
make
m # alias for `make`
Otherwise, you'll need to install the following dependencies manually (and you can skip safely installing nix package manager):
For calling fish-pepper:
$ just fish-pepper <ARGS> # just fp <ARGS>For rendering docker templates (alias of fish-pepper build):
$ just build # just bFor rendering and building docker templates using available docker daemon (alias of fish-pepper make):
$ just make # just mFor formatting source code with treefmt:
$ just fmt # just fThere are some notable differences with upstream:
- Inclusion of
nixanddirenvto have a reproducible dev environment. - Support for more OSes like Ubuntu and removal of Jboss one.
- Support for JDK17.
- Minor corrections to Dockerfiles suggested by
hadolint.
If you detect any issues with the provided images, feel free to open an issue (also, a PR with the fix will be greatly appreciated!).