SLE BCI OpenJDK 21 development

OpenJDK 21 development container based on the SLE Base Container Image.

Get Image
Digest:
sha256:7749b8b19a385936686b3dc145be1122b450716e8ab0b2fca4113b4e4c53a103
7749b8b19
Repository:
registry.suse.com/bci/openjdk-devel:21

OpenJDK 21 development container image

RedistributableSLSA Provenance: Available

Description

OpenJDK (Open Java Development Kit) is a free and open source implementation of the Java Platform, Standard Edition (Java SE). OpenJDK is the official reference implementation of Java SE since version 7.

The OpenJDK development image is intended to be used as a build environment. For runtime, use the OpenJDK runtime image.

Usage

The default command for the image is the Java Shell tool (JShell).

$ podman run -it --rm registry.suse.com/bci/openjdk-devel:21
jshell> /help

To compile and deploy an application, copy the sources and build the binary:

# Build the application using the OpenJDK development image
FROM registry.suse.com/bci/openjdk-devel:21 as build

WORKDIR /app

COPY . ./

RUN javac Hello.java

# Bundle the application into OpenJDK runtime image
FROM registry.suse.com/bci/openjdk:21

WORKDIR /app

COPY --from=build /app/Hello.class /app

CMD ["java", "Hello"]

Build and run the container image:

$ podman build -t my-java-app .
$ podman run -it --rm my-java-app

There are situations, where you don't want to run an application inside a container.

To compile the application, without running it inside a container instance, use the following command:

$ podman run --rm -v "$PWD":/app:Z -w /app registry.suse.com/bci/openjdk-devel:21 javac Hello.java

Additional tools

The OpenJDK 21 development image includes Git and Apache Maven. Apache Ant is available in the repositories.

Licensing

SPDX-License-Identifier: MIT

This documentation and the build recipe are licensed as MIT. The container itself contains various software components under various open source licenses listed in the associated Software Bill of Materials (SBOM).

This image is based on SLE BCI, a stable and redistributable foundation for software innovation. SLE BCI is enterprise-ready, and it comes with an option for support.

See the SLE BCI EULA for further information.

  • Image Data

    Last Built: 12 Mar 13:40 UTC

    Compressed Size: 155.8 MB

    Uncompressed Size: 410.3 MB

    Support Level: L3

    Supported until: 30 Jun 2031


  • Health Index
    A

    No vulnerabilities found

    Last Scan:

    1 day ago