posts

BellSoft’s Docker Hub images overview

figure
Nov 25, 2022
Dmitry Chuyko

BellSoft provides a variety of ways to install its products. You can build your own image using any Linux distro and our binaries or package repositories. Alternatively, take advantage of our OCI container images by visiting BellSoft’s profile on Docker Hub .

The Docker Hub images are grouped into repositories, each contains a number of tags pointing to an image. But given that we supply images for a wide range of system configurations and software versions, developers may be unsure where to look first. So we created an overview of our Docker Hub images that will help you to make an informed choice.

Choose the operating system

We provide Liberica JDK container images for the most popular Linux distributions — Debian, CentOS, Alpine Linux — and for our own lightweight operating system, Alpaquita Linux, optimized for cloud-native applications. Alpaquita is based on Alpine, but comes with several significant improvements:

  • Userspace binaries protection
  • Four malloc implementations in total
  • Optimized standard C library implementation ‘musl perf’, both small and performant
  • Base image size of 3.22MB, which is perfect for running small and performant containers
  • Docker and QEMU support

If you are looking for a way to increase the performance of your applications, save cloud resources, and receive regular security updates, head to Alpaquita repositories. 

Alpaquita Linux base

The alpaquita-linux-base repository contains base Alpaquita images. The base image is only 3.22MB, perfect for small containers. It can be used ‘as is’ or customized by installing additional packages from Alpaquita repositories.

There are two types of tags in this repo to take note of. The first one is the OS version: LTS or Stream, the latter being an upstream development branch. The Stream version has an alias tag with a version in the form of a date. Alternatively, use a stream tag with the latest OS release. The second tag points to the C library implementation: musl or glibc. Our musl perf is 100% compatible with stock musl, so if you have previously utilized a musl-based system such as Alpine, the migration won’t cause any issues. In case your OS is glibc-based and switching libc is off the table, consider Alpaquita Linux with glibc, which is more performant than popular glibc-based systems in some cases. For more information on Alpaquita Linux performance, refer to the comparative study overview.

Image tag structure:

[OS version]-[libc]-X,

where X is the OS version number.

For example, bellsoft/alpaquita-linux-base:stream-musl-221017 is a base Alpaquita Linux image, musl-based Stream version, released on October 17, 2022

Note that every repository has the ‘latest’ tag that points to the latest version of an image.

Alpaquita Linux and Liberica JDK Lite: a ready-to-go solution

We created Alpaquita Linux to help Java become a perfect language for cloud computing. Therefore, our containers including the only OS optimized for Java and a lightweight Java runtime are an end-to-end solution for enterprises working in the Cloud.

  • The liberica-runtime-container repository contains Alpaquita images with Liberica JDK Lite and JRE Lite
  • The liberica-native-image-kit-container repository contains Alpaquita images with Liberica Native Image Kit (NIK), a utility for converting JVM applications into native executables with almost instant startup time

The repository with Liberica Runtime Containers includes additional tags with LTS Java (8, 11, 17) versions. In addition, you must choose a JDK type:

  • jdk — Liberica JDK Lite version optimized for the Cloud
  • jdk-all — a package with Liberica JDK that can be used to create a custom runtime with a help of jlink tool
  • jre — Liberica JRE for running Java applications 

The Java version comes after the jdk type. For each Java version, there are JRE and JDK images for each Alpaquita libc type.

Image tag structure:

[JDK type]-X-[OS version]-[libc type]-Y,

where X is the Java version, and Y is the OS version number.

For instance, bellsoft/liberica-runtime-container:jdk-11-stream-glibc-20221018 is a container with Liberica JDK 11 and glibc-based Alpaquita Stream, released on October 18, 2022

As for the Liberica NIK Containers, the tags include the Liberica NIK version for each JDK type. Note that NIK supports only Java 11 and 17. For each Java version, there are also images for each Alpaquita libc type.

Image tag structure:

[JDK type]-X-nik-Y-[OS version]-[libc type],

where X is the Java version, and Y is the NIK version.

For example, bellsoft/liberica-native-image-kit-container:jdk-17-nik-22.2-stream-musl is a container with Liberica NIK version 22.2 for Java 17 and the latest version of musl-based Alpaquita Stream

All images are ready to use, simply put your applications with dependencies into the selected container and that’s it!

Alpaquita for other programming languages

We also provide packages for other languages: Python and C/C++:

  • The alpaquita-linux-python repository contains Alpaquita images with Python and basic Python utilities: pip, setuptools, wheel
  • The alpaquita-linux-gcc repository contains Alpaquita images with the GCC compiler, tools, and libraries for development in C/C++

The tags include language version — Alpaquita currently supports Python 3.10 and GCC 11.2 — and libc type.

For example,

Liberica Lite with other operating systems

Non-Alpaquita repositories contain Liberica JDK or JRE for Alpine Linux, CentOS, and Debian.

First, choose a JDK or JRE repository. The available tags point at the Java version (right after the OS name) and supported architecture.

Image tag structure:

X-Y,

where X is the Java version and Y is the architecture type. If the architecture type is not included into the name, then the build supports AMD64 and ARM64 by default.

For instance,

All existing containers for operating systems can be substituted with a Liberica Runtime Container including Liberica JDK and Alpaquita Linux based on musl perf or glibc. This way, you will get a whole package for cloud-native Java apps:

  • Microcontainers
  • Liberica JDK Lite optimized for the Cloud environment with additional features improving memory consumption and performance
  • Small and performant Alpaquita Linux
  • Timely security patches and fixes both for JDK and Linux from one vendor

Switch to the Liberica Runtime Container by changing one line in your Dockerfile. For instance, instead of

FROM bellsoft/liberica-openjdk-alpine-musl:17

use

FROM bellsoft/liberica-runtime-container:jdk-17-musl

Note that our images include shell that supports exec, so for your RUN clause you can use not only the most common exec form but also a shell form as shown below:

ENTRYPOINT exec java $JAVA_TOOL_OPTIONS -jar /app/app.jar

How to pull a Docker image

Download the image with docker pull:

docker image pull docker bellsoft/<repository>:<image_tag>

Start a container from a pulled image with docker run:

docker run -it --rm bellsoft/<repository>:<image_tag>

Alternatively, use a combined command:

docker container run --rm -it bellsoft/<repository>:<image_tag>

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

A walk through BellSoft’s Docker Hub repositories

We prepared an interactive scheme so that you could conveniently choose a suitable Liberica JDK image.

A walk through BellSoft's Docker Hub images

posts
Alpaquita vs Alpine: a head-to-head comparison
figure
Nov 10, 2022
Dmitry Chuyko
shorts
Critical vulnerabilities in OpenSSL 3.0
Nov 11, 2022
Sergey Chernyshev

Find out about the newest CVEs discovered in OpenSSL 3.0 and how to eliminate the risk of exploits

Subcribe to our newsletter

figure

Read the industry news, receive solutions to your problems, and find the ways to save money.