Chiseled Java runtime based on Ubuntu. Long-term tracks maintained by Canonical.
500K+
ubuntu/jre is a rock for jre maintained by Canonical.
OpenJDK is the official reference implementation of Java Platform, Standard Edition (Java SE), since version 7. This image packs the Java Runtime Environment, coming from the OpenJDK project, a free and open source implementation of the Java Platform, Standard Edition (Java SE).
Java is a registered trademark of Oracle and/or its affiliates.
NOTE: These tags follow a specific naming convention that respects the concept of channels.
| Tags | Supported until | Version | Base | Architectures | |
|---|---|---|---|---|---|
25-26.04_stable | aliases25-26.04, 25-26.04_beta, 25-26.04_candidate, 25-26.04_edge | 05/2031 | 25 | 26.04 | arm64, amd64 |
21-24.04_stable | aliases21-24.04, 21-24.04_beta, 21-24.04_candidate, 21-24.04_edge | 05/2029 | 21 | 24.04 | arm64, amd64 |
17-24.04_stable | aliases17-24.04, 17-24.04_beta, 17-24.04_candidate, 17-24.04_edge | 05/2029 | 17 | 24.04 | arm64, amd64 |
11-24.04_stable | aliases11-24.04, 11-24.04_beta, 11-24.04_candidate, 11-24.04_edge | 05/2029 | 11 | 24.04 | amd64, arm64 |
17-22.04_edge | aliases17-22.04_114, 17-22.04_edge_114, 17_edge, edge | 06/2027 | 17 | 22.04 | amd64, arm64 |
8-22.04_edge | aliases8-22.04_112, 8-22.04_edge_112, 8_edge | 06/2027 | 8 | 22.04 | amd64, arm64 |
This rock's entrypoint is Pebble, a container-optimized init process that enables the orchestration of a collection of local service processes as an organized set.
To view the Pebble services and checks defined in this rock:
docker run --rm ubuntu/jre:25-26.04_stable plan
The container spins up with the default entrypoint. To inspect the entrypoint and command:
docker inspect --format='{{.Config.Entrypoint}} {{.Config.Cmd}}' ubuntu/jre:25-26.04_stable
To run this rock, use any of the usual container runtimes, for example, docker:
docker run --name jre-container \
--rm \
ubuntu/jre:25-26.04_stable \
exec java
The container logs will simply show the OpenJRE help message. This is because the container expects a compiled Java application to be given.
Let's use the following Hello World application as an example:
// HelloWorld.java
class HelloWorld
{
public static void main(String args[])
{
System.out.println("Hello, World");
}
}
You can build and package the above Hello World application with chiselled Ubuntu 24.04 using the following example Dockerfile.
FROM ubuntu:24.04 AS builder
RUN apt-get update && apt-get install -y openjdk-8-jdk
WORKDIR /app
ADD HelloWorld.java .
RUN javac -source 8 -target 8 HelloWorld.java -d .
FROM ubuntu/jre:21-24.04_edge
COPY --from=builder /app/HelloWorld.class .
CMD [ "exec", "java", "-cp", "/", "HelloWorld" ]
docker run --name jre-container \
--rm \
ubuntu/jre:25-26.04_stable
The Ubuntu 22.04 JRE images are Dockerfile-based images.
You can build and package the above Hello World application with chiselled Ubuntu 22.04 JRE 8 and 17 using the following example Dockerfile.
FROM ubuntu:22.04 AS builder
RUN apt-get update && apt-get install -y openjdk-8-jdk
WORKDIR /app
ADD HelloWorld.java .
RUN javac -source 8 -target 8 HelloWorld.java -d .
FROM ubuntu/jre:8-22.04_edge
WORKDIR /
COPY --from=builder /app/HelloWorld.class .
CMD [ "HelloWorld" ]
java [options] <mainclass> [args...]
...
To view the logs of the running container, run:
docker exec jre-container pebble logs
Or, for a specific service:
docker exec jre-container pebble logs <service>
To view the logs of the running container, run:
docker logs jre-container
Rocks may have predefined health checks that you can list by running:
docker exec jre-container pebble checks
The overall health of your container can be inspected via:
docker exec jre-container pebble health
| Option | Description | Default |
|---|---|---|
| TZ | Configures the timezone value for Java process execution. | None |
| Option | Description | Default |
|---|---|---|
-v <host-path>:/app | Configure with a host mount to provide compiled classes or application files. | None |
| Option | Description | Default |
|---|---|---|
exec java <args> | Execute with Java command arguments or classpath options. | None |
| Option | Description | Default |
|---|---|---|
--rm | Run with automatic container cleanup after exit. | None |
Canonical is the provider of this container image. It is the user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within, as well as with Canonical’s IP Policy.
Content type
Image
Digest
sha256:a9e735f98…
Size
71.4 MB
Last updated
3 days ago
docker pull ubuntu/jre:25-26.04_stablePulls:
3,006
Last week