Ubuntu rock for OpenJDK
10K+
ubuntu/jdk is a rock for jdk maintained by Canonical.
OpenJDK is the official reference implementation of Java SE since version 7. Read more. This image packs the Java Development Kit, 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 | amd64, arm64 |
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 | 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/jdk:25-26.04_stable plan
To run this rock, use any of the usual container runtimes, for example, docker:
docker run --name jdk-container \
--rm -v /path/to/dir/contains/HelloWorld.java:/work -w /work \
ubuntu/jdk:25-26.04_stable \
exec java HelloWorld.java
JDK starts and runs the Hello World Java application as defined below, and outputs "Hello, World" to the terminal.
// HelloWorld.java
class HelloWorld
{
public static void main(String args[])
{
System.out.println("Hello, World");
}
}
To view the logs of the running container, run:
docker exec jdk-container pebble logs
Or, for a specific service:
docker exec jdk-container pebble logs <service>
Rocks may have predefined health checks that you can list by running:
docker exec jdk-container pebble checks
The overall health of your container can be inspected via:
docker exec jdk-container pebble health
| Option | Description | Default |
|---|---|---|
TZ | Timezone. | UTC |
| Option | Description | Default |
|---|---|---|
exec java [options] <args> | Java runtime command. | 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:2a313070f…
Size
186.5 MB
Last updated
1 day ago
docker pull ubuntu/jdk:25-26.04_stablePulls:
820
Last week