BellSoft Hardened Images
Overview
Section titled “Overview”BellSoft Hardened Images are minimized container images based on Alpaquita Linux that strip out package managers and non-essential components. With a locked configuration that cannot be modified, they minimize the risk of attackers introducing malware or tampering with the runtime.
The images are continuously patched for CVEs, which keeps them close to zero known vulnerabilities. Hardened images are available for the following languages and runtimes, all built on Alpaquita Linux:
- Java (Liberica JDK Lite)
- GraalVM (Liberica Native Image Kit)
- Python
- Node.js
- Go
- C/C++ (GCC)
Hardened images are published on Docker Hub, GitHub Container Registry (GHCR), Microsoft Container Registry (MCR), Google Container Registry (GCR), and Amazon Elastic Container Registry (ECR).
For the list of available repositories and their tags, see Hardened Image Catalog.
Hardened image types
Section titled “Hardened image types”The images are shipped with one of the following utilities and components: Liberica JDK, Liberica Native Image Kit (GraalVM), Python, Node.js, Go, or GCC/C++.
There are several types of images, each offering a different balance between debugging and security: standard, nonroot, and distroless. The differences between them are summarized in the table below:
| standard | nonroot | distroless | |
|---|---|---|---|
| user | root | appuser | appuser |
| command line available | yes | yes | no |
| entrypoint | /bin/sh | /bin/sh | application |
- Tools for installing new software (apk-tools) have been removed from all images.
- The nonroot and distroless images have an unprivileged user named
appuserwith a home directory. This user is used to run the entrypoint. - Distroless images are shipped without a command line and with only a minimal set of libraries and other dependencies required to run applications.
- All three image types are hosted in the same repository, but with different tags. If the tag contains the word
nonroot, it is a nonroot image; ifdistroless, it is a distroless image; otherwise, it is a standard image.
Getting started
Section titled “Getting started”The following steps use the Docker tool. Podman provides a similar command-line interface and can be used in place of Docker.
-
Pull an image from any supported container registry:
Terminal window docker pull bellsoft/<repository>:<image_tag> -
Run a container from the pulled image:
Terminal window docker run --name my-app bellsoft/<repository>:<image_tag> -
Use as a base image in your Dockerfile:
FROM bellsoft/<repository>:<image_tag>
For example, with the hardened Liberica JDK runtime:
# Pull the latest hardened Java runtimedocker pull bellsoft/hardened-liberica-runtime-container:jdk-21-glibc
# Run with your applicationdocker run -v /path/to/app:/app bellsoft/hardened-liberica-runtime-container:jdk-21-glibc java -jar /app/myapp.jar
# Use in a DockerfileFROM bellsoft/hardened-liberica-runtime-container:jdk-21-glibcRegistries
Section titled “Registries”Hardened images are published on all major container registries. The repository names are the same across registries; only the pull-URL prefix differs.
| Registry | Pull-URL prefix | Authentication |
|---|---|---|
| Docker Hub | bellsoft/<repository>:<tag> | No |
| GitHub Container Registry | ghcr.io/bell-sw/<repository>:<tag> | No |
| Microsoft Container Registry | bellsoft.azurecr.io/<repository>:<tag> | No |
| Google Container Registry | us-docker.pkg.dev/bellsoft/gcr.io/<repository>:<tag> | Yes |
| Amazon ECR | public.ecr.aws/bellsoft/<repository>:<tag> | No |
The following examples pull the hardened base image from each registry:
docker pull bellsoft/hardened-base:glibcdocker pull bellsoft/hardened-base:musldocker pull ghcr.io/bell-sw/hardened-base:glibcdocker pull ghcr.io/bell-sw/hardened-base:musldocker pull bellsoft.azurecr.io/hardened-base:glibcdocker pull bellsoft.azurecr.io/hardened-base:musldocker pull us-docker.pkg.dev/bellsoft/gcr.io/hardened-base:glibcdocker pull us-docker.pkg.dev/bellsoft/gcr.io/hardened-base:musldocker pull public.ecr.aws/bellsoft/hardened-base:glibcdocker pull public.ecr.aws/bellsoft/hardened-base:musl