Skip to content
BG
hardened-liberica-runtime-container
hardened-liberica-runtime-containerHardened IconSecurity-hardened Liberica JDK/JRE container images on Alpaquita Linux with minimal attack surface. Supports glibc and musl libc, optional CRaC and CDS. LTS OS variants available under commercial license.Updated 4 hours ago
Quick Pull$ docker pull bellsoft/hardened-liberica-runtime-container:latest

Overview

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 Cloud
  • jdk-all — an image with Liberica JDK that can be used to create a custom runtime with a help of jlink tool
  • jre — 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 type can be jdk, jdk-all and jre
  • Java version is a Java version; can be specified as the major version only (such as 21) or as the full version (21.0.7_9 for 21.0.7+9 Liberica JDK)
  • crac is present in images which provide Coordinated Restore at Checkpoint (CRAC) JDKs
  • cds is present in images which include Class Data Sharing JRE archives to speed up JRE startup speed.
  • libc specifies 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.