// SPDX-FileCopyrightText: © 2022 Matthias Andreas Benkard <code@mail.matthias.benkard.de>
//
// SPDX-License-Identifier: GFDL-1.3-or-later

= openjdk-runtime
Matthias Andreas Benkard
// Meta
:experimental:
:data-uri:
:sectnums:
:toc:
:stem:
:keywords: mulk
// Settings
:icons: font
:source-highlighter: rouge

A container image that contains an OpenJDK runtime suitable for running
modern web services.


== Summary

This container image ships the latest OpenJDK feature release from
https://jdk.java.net[jdk.java.net] on top of a
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/building_running_and_managing_containers/assembly_types-of-container-images_building-running-and-managing-containers#con_understanding-the-ubi-micro-images_assembly_types-of-container-images[Red
Hat UBI Micro] base.

The module set was selected for
https://gerrit.benkard.de/plugins/gitiles/mulkcms2/[MulkCMS 2], which
is a typical Quarkus application.  It will very likely work for other
typical Quarkus applications.


== Building

[source,shell]
----
./prepare
docker build -t $IMAGE_NAME .
----


== Customization

You may want to customize the module set included in the JDK.

For example, specifying `ALL-MODULE-PATH` includes all modules
included in the OpenJDK distribution:

[source,dockerfile]
----
RUN /jdk/*/bin/jlink \
    -J-XX:MaxRAMPercentage=75 \
    --add-modules ALL-MODULE-PATH \ #<1>
    --compress=1 \
    --no-man-pages \
    --strip-debug \
    --output /java
----
<1> Include all JDK modules.


== Usage

[source,shell]
----
docker run $IMAGE_NAME java -version
----
