Containers with Liberica JDK

On Docker Hub, GHCR, and MCR

We provide ready container images with Liberica JDK and JRE for x86_64 and arm64. Read on to find how to get them.

Why use containers with Liberica JDK?

Liberica JDK is an OpenJDK distribution that makes Java application development

  • Flexible through the support of the widest range of present-day architectures and operating systems;
  • Cost-efficient with the smallest containers in the world;
  • Secure thanks to timely CPU releases with security patches and critical fixes.

We provide ready container images with Liberica JDK and JRE for x86_64 and AArch64 for the following operating systems:

  • Alpaquita Linux with optimized musl and glibc;
  • Alpine Linux with musl and glibc;
  • CentOS (deprecated);
  • Debian;
  • Rocky Linux.

You can utilize an interactive scheme below to choose a suitable Liberica JDK image for your project.

You can use an interactive scheme below to choose a suitable Liberica JDK image for your project.


Supported operating systems:

Alpine Linux Logo
Alpaquita Linux
with optimized musl and glibc;
Alpine Linux Logo
Alpine Linux
Rocky Linux Logo
Rocky Linux
Debian Logo
Debian

Use the scheme to choose a suitable Liberica JDK image for your project

How to pull the images

Download the image with docker pull from Docker Hub, GHCR or Azure:

docker pull <image name>

Where the image name can be one of the following:

Dockerhub:


docker.io/bellsoft/<repository>:<image_tag>
bellsoft/<repository>:<image_tag> (default is docker.io)

Github Container Registry:

ghcr.io/bell-sw/<repository>:<image_tag>

Microsoft Container Registry:

bellsoft.azurecr.io/<repository>:<image_tag>

Note that if the :<image-tag> part is omitted, it is substituted with the :latest.

Start a container from a pulled image with docker run:

docker run -it --rm <image name>

Docker Hub images

BellSoft’s OCI container images of Liberica JDK are grouped into several repositories on Docker Hub, pertaining to a specific OS and runtime configuration. Each repository contains a number of tags pointing to software version or type.

Summary of Liberica JDK Docker Hub repositories

Repo nameDescription
The repository contains images with Liberica Lite and Alpaquita Linux
The repositories contain Alpine Linux musl images of Liberica JDK and JRE
The repositories contain Alpine Linux musl images of Liberica JDK and JRE
The repositories contain Debian images of Liberica JDK and JRE
The repositories contain Rocky images of Liberica JDK and JRE
The repositories contain CentOS images of Liberica JDK and JRE. Please note, that these images are considered deprecated and will no longer receive updates, as CentOS Stream 8 reached its end of live.

  • Liberica JDK 11 - 11, 11.0.19, 11.0.19-7
  • Liberica JDK 17 - 17, 17.0.7, 17.0.7-7
  • Liberica JDK 21 - 21, 21-37, latest
  • Liberica JDK 8 - 8, 8u, 8u372, 8u372-7

Full list of tags is available on repository page in Docker Hub

How to use Docker images with Liberica JDK

Pull specific version

Get the latest build of specific version:

docker pull bellsoft/liberica-openjdk-alpine:8
docker pull bellsoft/liberica-openjdk-alpine:11
docker pull bellsoft/liberica-openjdk-alpine:17
docker pull bellsoft/liberica-openjdk-alpine:20

Or get the latest version:

docker pull bellsoft/liberica-openjdk-alpine

or

docker pull bellsoft/liberica-openjdk-alpine:latest

Instead of bellsoft/liberica-openjdk-alpine you can use one of the following:

bellsoft/liberica-openjdk-alpine-musl
bellsoft/liberica-openjdk-debian
bellsoft/liberica-openjdk-rocky
bellsoft/liberica-openjre-alpine
bellsoft/liberica-openjre-alpine-musl
bellsoft/liberica-openjre-debian
bellsoft/liberica-openjre-rocky

Also you can use full url:

docker.io/bellsoft/liberica-openjdk-alpine
docker.io/bellsoft/liberica-openjdk-alpine-musl
docker.io/bellsoft/liberica-openjdk-debian
docker.io/bellsoft/liberica-openjdk-rocky
docker.io/bellsoft/liberica-openjre-alpine
docker.io/bellsoft/liberica-openjre-alpine-musl
docker.io/bellsoft/liberica-openjre-debian
docker.io/bellsoft/liberica-openjre-rocky

If you need to get specific arch version, you can use complex tag (see tags description):

docker pull bellsoft/liberica-openjdk-alpine:17.0.7-7-x86_64

Run specific version

Run command line in specific image:

docker run -it --rm bellsoft/liberica-openjdk-alpine:8
docker run -it --rm bellsoft/liberica-openjdk-alpine:11
docker run -it --rm bellsoft/liberica-openjdk-alpine:17
docker run -it --rm bellsoft/liberica-openjdk-alpine:20

or

docker run -it --rm bellsoft/liberica-openjdk-alpine

Java version in specific image:

docker run -it --rm bellsoft/liberica-openjdk-alpine java -version

You will get the following output:

openjdk version "20.0.1" 2023-04-18
OpenJDK Runtime Environment (build 20.0.1+10)
OpenJDK 64-Bit Server VM (build 20.0.1+10, mixed mode)

GitHub Container Registry (GHCR) images

BellSoft’s GitHub public docker images of Liberica JDK can be seamlessly integrated into the project. With GitHub CR, You can access the images anonymously. GHCR includes Liberica Runtime Container with Liberica Lite and Alpaquita Linux (optimized musl or glibc), Liberica JDK and JRE images for Alpine (musl or glibc), Debian, and Rocky Linux. The repositories are classified based on the OS type.

Summary of Liberica JDK GHCR repositories

Repo nameDescription
The repository contains images with Liberica Lite and Alpaquita Linux
The repositories contain Alpine Linux musl images of Liberica JDK and JRE
The repositories contain Alpine Linux musl images of Liberica JDK and JRE
The repositories contain Debian images of Liberica JDK and JRE
The repositories contain Rocky images of Liberica JDK and JRE
The repositories contain CentOS images of Liberica JDK and JRE. Please note, that these images are considered deprecated and will no longer receive updates, as CentOS Stream 8 reached its end of live.

  • Liberica JDK 11 - 11, 11.0.19, 11.0.19-7
  • Liberica JDK 17 - 17, 17.0.7, 17.0.7-7
  • Liberica JDK 21 - 21, 21-37, latest
  • Liberica JDK 8 - 8, 8u, 8u372, 8u372-7

How to use GHCR images with Liberica JDK

Pull specific version

Get the latest build of specific version:

docker pull ghcr.io/bell-sw/liberica-openjdk-alpine:8
docker pull ghcr.io/bell-sw/liberica-openjdk-alpine:11
docker pull ghcr.io/bell-sw/liberica-openjdk-alpine:17
docker pull ghcr.io/bell-sw/liberica-openjdk-alpine:20

Or get the latest version:

docker pull ghcr.io/bell-sw/liberica-openjdk-alpine

or

docker pull ghcr.io/bell-sw/liberica-openjdk-alpine:latest

Instead of ghcr.io/bell-sw/liberica-openjdk-alpine you can use one of the following:

ghcr.io/bell-sw/liberica-openjdk-alpine-musl
ghcr.io/bell-sw/liberica-openjdk-debian
ghcr.io/bell-sw/liberica-openjdk-rocky
ghcr.io/bell-sw/liberica-openjre-alpine
ghcr.io/bell-sw/liberica-openjre-alpine-musl
ghcr.io/bell-sw/liberica-openjre-debian
ghcr.io/bell-sw/liberica-openjre-rocky

If you need to get specific arch version, you can use complex tag (see tags description):

docker pull ghcr.io/bell-sw/liberica-openjdk-alpine:17.0.7-7-x86_64

Run specific version

Run command line in specific image:

docker run -it --rm ghcr.io/bell-sw/liberica-openjdk-alpine:8
docker run -it --rm ghcr.io/bell-sw/liberica-openjdk-alpine:11
docker run -it --rm ghcr.io/bell-sw/liberica-openjdk-alpine:17
docker run -it --rm ghcr.io/bell-sw/liberica-openjdk-alpine:20

or

docker run -it --rm ghcr.io/bell-sw/liberica-openjdk-alpine

Java version in specific image:

docker run -it --rm ghcr.io/bell-sw/liberica-openjdk-alpine java -version

You will get the following output:

openjdk version "20.0.1" 2023-04-18
OpenJDK Runtime Environment (build 20.0.1+10)
OpenJDK 64-Bit Server VM (build 20.0.1+10, mixed mode)

Microsoft Container Registry (MCR) images

Microsoft Container Registry includes Liberica Runtime Container with Liberica Lite and Alpaquita Linux (optimized musl or glibc), Liberica JDK and JRE images for Alpine (musl or glibc), Debian, and Rocky Linux. The repositories are classified based on the OS type.

Summary of Liberica JDK MCR repositories

Repo nameDescription
  • bellsoft.azurecr.io/liberica-runtime-container
The repository contains images with Liberica Lite and Alpaquita Linux
  • bellsoft.azurecr.io/liberica-openjdk-alpine-musl
  • bellsoft.azurecr.io/liberica-openjre-alpine-musl
The repositories contain Alpine Linux musl images of Liberica JDK and JRE
  • bellsoft.azurecr.io/liberica-openjdk-alpine
  • bellsoft.azurecr.io/liberica-openjre-alpine
The repositories contain Alpine Linux musl images of Liberica JDK and JRE
  • bellsoft.azurecr.io/liberica-openjdk-debian
  • bellsoft.azurecr.io/liberica-openjre-debian
The repositories contain Debian images of Liberica JDK and JRE
  • bellsoft.azurecr.io/liberica-openjdk-rocky
  • bellsoft.azurecr.io/liberica-openjre-rocky
The repositories contain Rocky images of Liberica JDK and JRE
  • bellsoft.azurecr.io/liberica-openjdk-centos
  • bellsoft.azurecr.io/liberica-openjre-centos
The repositories contain CentOS images of Liberica JDK and JRE. Please note, that these images are considered deprecated and will no longer receive updates, as CentOS Stream 8 reached its end of live.

  • Liberica JDK 11 - 11, 11.0.19, 11.0.19-7
  • Liberica JDK 17 - 17, 17.0.7, 17.0.7-7
  • Liberica JDK 21 - 21, 21-37, latest
  • Liberica JDK 8 - 8, 8u, 8u372, 8u372-7

Pull specific version

Get the latest build of specific version:

docker pull bellsoft.azurecr.io/liberica-openjdk-alpine:8
docker pull bellsoft.azurecr.io/liberica-openjdk-alpine:11
docker pull bellsoft.azurecr.io/liberica-openjdk-alpine:17
docker pull bellsoft.azurecr.io/liberica-openjdk-alpine:20

Or get the latest version:

docker pull bellsoft.azurecr.io/liberica-openjdk-alpine

or

docker pull bellsoft.azurecr.io/liberica-openjdk-alpine:latest

Instead of bellsoft.azurecr.io/liberica-openjdk-alpine you can use one of the following:

bellsoft.azurecr.io/liberica-openjdk-alpine-musl
bellsoft.azurecr.io/liberica-openjdk-debian
bellsoft.azurecr.io/liberica-openjdk-rocky
bellsoft.azurecr.io/liberica-openjre-alpine
bellsoft.azurecr.io/liberica-openjre-alpine-musl
bellsoft.azurecr.io/liberica-openjre-debian
bellsoft.azurecr.io/liberica-openjre-rocky

If you need to get specific arch version, you can use complex tag (see tags description):

docker pull bellsoft.azurecr.io/liberica-openjdk-alpine:17.0.7-7-x86_64

Run specific version

Run command line in specific image:

docker run -it --rm bellsoft.azurecr.io/liberica-openjdk-alpine:8
docker run -it --rm bellsoft.azurecr.io/liberica-openjdk-alpine:11
docker run -it --rm bellsoft.azurecr.io/liberica-openjdk-alpine:17
docker run -it --rm bellsoft.azurecr.io/liberica-openjdk-alpine:20

or

docker run -it --rm bellsoft.azurecr.io/liberica-openjdk-alpine

Java version in specific image:

docker run -it --rm bellsoft.azurecr.io/liberica-openjdk-alpine java -version

You will get the following output:

openjdk version "20.0.1" 2023-04-18
OpenJDK Runtime Environment (build 20.0.1+10)
OpenJDK 64-Bit Server VM (build 20.0.1+10, mixed mode)

Available tags and JDK versions

The table below summarizes the tags available in BellSoft’s repositories across all container registries. Note that Liberica Runtime Container (Liberica Lite with Alpaquita Linux*) supports only LTS Java versions (8, 11, 17, 21). The ‘latest’ tag in all repositories points to the latest version of an image.

VersionsTagsTag structure
Liberica Runtime Container
  • Java version (8, 11, 17, 21, 23)
  • JDK type (jdk, jdk-all with jlink, jre)
  • libc type (musl or glibc)
[JDK type]-X-[OS version]-[libc type]-Y, where X is the Java version, and Y is the OS version number.
Liberica JDK for Alpine, Debian, Rocky Linux
  • Java versions LTS (8, 11, 17, 21) and non-LTS (19, 20, etc.) See all available tags on the related CR page
  • Supported architecture (x86_64, aarch64, armhf**)
X-Y, where X is the Java version and Y is the architecture type***. X can be appended with "-cds", in which case the image will include files for AppCDS.

*Alpaquita Linux is a lightweight Linux distribution with a base image of only 3.32 MB optimized for cloud-native applications. It comes with several performance and security enhancements and two libc implementations, optimized musl and glibc. You can learn more about Alpaquita Linux in the dedicated article. The comparative performance study of Alpaquita and other popular Linux distros can be found here.
**The armhf (arm hard float) is suitable for devices like Raspberry Pi 2/3.
***If the architecture type is not included into the name, then the build supports x86_64 and AArch64 by default. The tags have the following structure: major-version[update/patch[-build]][-arch]. As an example, Liberica JDK build 8u372+7 for Arm64 will have the 8u372-7-aarch64 tag. If 8u372+7 is the latest version of image, tags 8u372-7, 8u372, 8u and 8 will point to the 8u372+7 version.

Contact Form Background

Get guidance on migrating to Liberica JDK

Speak with an expert to see which solution will serve your business the best

* This field is required