Open Liberty container images

A container image is a layered executable software package that contains everything you need to build and run a containerized application. You can use an Open Liberty container image to build an application image that meets your development needs.

Open Liberty container images are available from the IBM Container Registry (ICR). You can pull images from ICR without authentication.

Container images on IBM Container Registry

You can append an Open Liberty container image tag to the icr.io/appcafe/open-liberty: source to specify the details of the container image that you pull from ICR. For more information, see the Build an application image section.

Select from the following container image tags for the latest Open Liberty release from ICR.

  • kernel-slim-java21-openj9-ubi-minimal

  • kernel-slim-java17-openj9-ubi

  • kernel-slim-java11-openj9-ubi

  • kernel-slim-java8-openj9-ubi

  • kernel-slim-java8-ibmjava-ubi

  • full-java21-openj9-ubi-minimal

  • full-java17-openj9-ubi

  • full-java11-openj9-ubi

  • full-java8-openj9-ubi

  • full-java8-ibmjava-ubi

  • beta

  • latest

These tags pull the latest version because they do not specify a version number. You can specify a version other than the latest version in the image tag. If you do not specify a tag value, latest is used by default. For more information about these tag values, see the Container image tags naming conventions section.

After the initial release of the Liberty container images, they are refreshed regularly (every 1-2 weeks) to include fixes for the operating system (OS) and Java. For more information on the full list of supported Open Liberty container images, see the IBM Container Registry (ICR) page on the Open Liberty GitHub repository.

If you have an IBM Cloud ID, you can generate a list of the currently available images in ICR by using the IBM Cloud CLI with the IBM Cloud Container Registry CLI plug-in installed. Authentication is required only to list the images. You can pull images from ICR without authentication. To list the images, run the following commands.

ibmcloud login
ibmcloud cr region-set global
ibmcloud cr images --restrict appcafe/open-liberty

Build an application image

You can use an Open Liberty container image tag in a Dockerfile or Containerfile file to build an application image that adds a single application and its corresponding configuration. Do not configure the container manually after it is started, except for debugging purposes, because these changes are not reflected in new containers that are created from the image.

Set your image template similar to the following example, which uses the kernel-slim-java21-openj9-ubi-minimal tag to build an image that uses the latest Open Liberty release with the OpenJ9 distribution of Java 21.

FROM icr.io/appcafe/open-liberty:kernel-slim-java21-openj9-ubi-minimal

# Add a Liberty server configuration including all necessary features
COPY --chown=1001:0  server.xml /config/

# This script adds the requested XML snippets to enable Liberty features and grow the image to be fit-for-purpose.
# This option is available only in the 'kernel-slim' image type. The 'full' and 'beta' tags already include all features.
RUN features.sh

# Add interim fixes (optional)
COPY --chown=1001:0  interim-fixes /opt/ol/fixes/

# Add an application
COPY --chown=1001:0  Sample1.war /config/dropins/

# This script adds the requested server configuration, applies any interim fixes, and populates caches to optimize the runtime.
RUN configure.sh

A template like this example results in a container image that has your application and configuration preinstalled, which means you can create new fully configured containers at any time. For more information about the different arguments and environment variables that you can specify to customize your application image, see the Open Liberty container image GitHub documentation.

You can also use Open Liberty InstantOn to improve the startup time of your application container image.

Container image tags naming conventions

Open Liberty container image tags use the following naming convention.

<optional fix pack version-><liberty image type>-<java version>-<java type>-<base image type>

The following tag values determine the resources that are included in a container image.

Fix pack version

This value is optional. If you do not specify a fix pack version, your container image includes the latest release of Open Liberty. In addition to the latest release, the two most recent quarterly fix pack releases are always maintained for the kernel-slim and full image types.

Open Liberty quarterly release versions end in .3, .6, .9, or .12. For example, if the latest Open Liberty release is 24.0.0.1, then the 23.0.0.12 and 23.0.0.9 releases are also maintained in ICR. To pull one of these release versions instead of the latest, add your chosen release version to the beginning of any of the kernel-slim or full image tags in the previous list. For example, if 23.0.0.12 is a recent quarterly release, you can pull an image that includes the 23.0.0.12 release with an OpenJ9 distribution of Java 8 by specifying the 23.0.0.12-full-java8-openj9-ubi tag. The beta image is available only for the latest beta release of Liberty and includes the latest Java JRE.

Liberty image type

Two different image types are available: kernel-slim or full. The full type provides a server with all Open Liberty features and packages installed.

The kernel-slim type provides just the bare minimum server, which you can customize by adding only the features that your application needs. This image type supports the best practice for production images because you end up with a more lightweight image that packages only what is essential for your application. For more information, see the Build an application image section.

Java version

This value determines the version of Java SE that the runtime uses. Tags are available for all Java long term support (LTS) releases that are listed on the Java SE Support page.

Java type

This value determines the type of Java SE distribution that the runtime uses. Current options are IBM Semeru Runtime with Eclipse OpenJ9, named openj9 and, for Java SE 8 only, the IBM SDK, Java Technology Edition, named ibmjava.

Both the ibmjava and openj9 Java types support the Linux x86_64 (amd64), Linux on Power (ppc64le), and Linux on IBM Z (s390x) architectures. Only images that use the openj9 Java type support the Linux on ARM (arm64) architecture.

All Java 21 images are based on Universal Base Image (UBI) 9 minimal and include IBM Semeru Runtimes for Java 21 JRE. These images all specify the openj9 type.

Java 8, 11 and 17 images with the openj9 type are based on Universal Base Image (UBI) 8 standard and include IBM Semeru Runtime for the respective Java version with the JDK. Java 8 images with the ibmjava type are based on Universal Base Image (UBI) 8 standard and include IBM Java 8 JRE.

Base image type

Liberty images are available with two different types of Red Hat Universal Base Image (UBI): ubi-minimal or ubi. ubi-minimal offers a minimized pre-installed content set and the package manager microdnf for adding additional packages. ubi offers the standard images with access to yum repositories and includes utilities such as tar and gzip.

In addition to the tags that follow this naming convention, Open Liberty offers the following preformatted tags that pull particular images.

  • latest: This tag simplifies pulling the full latest Open Liberty release with the latest Java JRE. It is an alias for the full-java21-openj9-ubi-minimal tag. If you do not specify a tag value, latest is used by default.

  • beta: This tag is based on Universal Base Image (UBI) 9 minimal and the latest Java JRE and provides the most recent beta release of Liberty, which includes all the features and capabilities from the most recent release, plus new and updated features that are currently in development. The beta image supports only the Linux x86_64 (amd64) architecture.