Go to file
2024-10-30 15:41:01 +00:00
_constraints [info=71bb7741d30fed19ab1bf3b061e7caff] 2024-10-17 08:43:06 +00:00
_service [info=71bb7741d30fed19ab1bf3b061e7caff] 2024-10-17 08:43:06 +00:00
.gitattributes [info=71bb7741d30fed19ab1bf3b061e7caff] 2024-10-17 08:43:06 +00:00
.gitignore [info=71bb7741d30fed19ab1bf3b061e7caff] 2024-10-17 08:43:06 +00:00
Dockerfile [info=82a887aefe9c76efa156644213e3a6f9] 2024-10-30 15:41:01 +00:00
openjdk-23-devel-image.changes [info=82a887aefe9c76efa156644213e3a6f9] 2024-10-30 15:41:01 +00:00
README.md [info=71bb7741d30fed19ab1bf3b061e7caff] 2024-10-17 08:43:06 +00:00

OpenJDK 23 development 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 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.opensuse.org/opensuse/bci/openjdk-devel:23
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.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

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.opensuse.org/opensuse/bci/openjdk-devel:23 javac Hello.java

Additional tools

The OpenJDK 23 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 openSUSE Tumbleweed.