Image Overview: jre

Overview: jre Chainguard Image


This image will switch from including a full complement of JDK binaries to a minimally required set in a forthcoming release. The work is being tracked in this GitHub issue.

If you rely on any binaries or libraries that are included in this image beyond the core JRE runtime, consider switching to the JDK Image.

Minimalist Wolfi-based Java JRE image using OpenJDK. Used for running Java applications.

Get It!

The image is available on

docker pull

Use it

Create a simple Java class

cat > <<EOL
class HelloWolfi
    public static void main(String args[])
        System.out.println("Hello Wolfi users!");

Next create a multistage Dockerfile and add the Java class

cat >Dockerfile <<EOL

COPY /home/build/
RUN javac


COPY --from=0 /home/build/HelloWolfi.class /app/
CMD ["HelloWolfi"]

Build the image

docker build -t my-simple-java-app .

Run the image

docker run my-simple-java-app