Go to file
2024-12-03 13:53:07 +00:00
_constraints [info=20967e0d3847b77ad5e9f6bdc8081c91] 2024-10-17 08:43:00 +00:00
_service [info=4f4b94b3dbd50fa6267553b7961633b8] 2024-12-03 13:53:07 +00:00
.gitattributes [info=20967e0d3847b77ad5e9f6bdc8081c91] 2024-10-17 08:43:00 +00:00
.gitignore [info=20967e0d3847b77ad5e9f6bdc8081c91] 2024-10-17 08:43:00 +00:00
Dockerfile [info=73ee2223b67caaeb92d68bfbe375cd84] 2024-10-30 15:41:16 +00:00
openjdk-23-image.changes [info=4f4b94b3dbd50fa6267553b7961633b8] 2024-12-03 13:53:07 +00:00
README.md [info=20967e0d3847b77ad5e9f6bdc8081c91] 2024-10-17 08:43:00 +00:00

OpenJDK 23 runtime container image

Redistributable

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 runtime image is intended to be used as a runtime environment. For development, use the OpenJDK development image.

Usage

To run a jar or war application inside a container instance, use the following command:

$ podman run --rm -v "$PWD":/app:Z -w /app registry.opensuse.org/opensuse/bci/openjdk:23 java -jar hello.jar

Or create a new contained based on OpenJDK 23 runtime image:

FROM registry.opensuse.org/opensuse/bci/openjdk:23

WORKDIR /app

COPY . ./

CMD ["java", "-jar", "hello.jar"]

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

# Build the application using the OpenJDK development image
FROM registry.opensuse.org/opensuse/bci/openjdk-devel:23  as build

WORKDIR /app

COPY . ./

RUN javac Hello.java

# Bundle the application into OpenJDK runtime image
FROM registry.opensuse.org/opensuse/bci/openjdk:23

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

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 openSUSE Tumbleweed.