
$ docker pull public.ecr.aws/bellsoft/hardened-liberica-runtime-container:latestOverview
Liberica Runtime Container
The repository contains hardened images with preinstalled Liberica JDK.
Java 8 JRE and Java 8 JDK images contain Liberica JDK. JRE and JDK images for other Java versions contain Liberica JDK Lite.
Getting Started
The next code example demonstrates a Dockerfile in which a Java application is first compiled into a jdk nonroot image, after that an image with a jre distroless-based application is created:
FROM bellsoft/hardened-liberica-runtime-container:jdk-11-nonroot-glibc AS builder
COPY <<'EOF' HelloBellsoft.java
public class HelloBellsoft {
public static void main(String[] args) {
System.out.println("Hello BellSoft!");
}
}
EOF
RUN javac HelloBellsoft.java
FROM bellsoft/hardened-liberica-runtime-container:jre-11-distroless-glibc
COPY --from=builder /home/appuser/HelloBellsoft.class .
ENTRYPOINT [ "/usr/bin/java" ]
CMD [ "HelloBellsoft"]
Hardened Containers images with Liberica JDK
Hardened Containers images with Liberica JDK Lite and JRE Lite:
jdk— Liberica JDK Lite version optimized for the Cloudjdk-all— an image with Liberica JDK that can be used to create a custom runtime with a help of jlink tooljre— Liberica JRE (only the runtime without the rest of JDK tools) for running Java applications
Tags
All tags follow the <JDK type>-<Java version>-[crac]-[cds]-<libc> structure, where
JDK typecan bejdk,jdk-allandjreJava versionis a Java version; can be specified as the major version only (such as21) or as the full version (21.0.7_9for21.0.7+9Liberica JDK)cracis present in images which provide Coordinated Restore at Checkpoint (CRAC) JDKscdsis present in images which include Class Data Sharing JRE archives to speed up JRE startup speed.libcspecifies either Glibc (glibc) or Musl (musl) libcs.
License
As with all Docker images, these also contain other software, which may be distributed under other licenses.
The list of installed software components and their licenses can be retrieved by executing the grep -E '^[PVL]:' /var/lib/apk/db/installed command.
As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.