Clean Premium Java 25 runtime on NiceOS Base — a purpose-built container OS. bitnami alternative.
3.4K
Java 25 GA on a purpose-built container OS — minimal, predictable, and secure. Base OS: NiceOS Base → a container-first Linux engineered for clarity and safety (not a trimmed general-purpose distro). Learn more about the base at https://hub.docker.com/r/niceos/base-os.
This repository uses a rolling GA strategy:
25.0.0 — moving (will be refreshed with security and base OS updates, but always stays in the 25.0.x GA line).latest — moving (always points to the newest GA).Production recommendation: pin to
25.0.0. Development recommendation:latestfor convenience.
Note: there is no generic
25tag.
Run Java (moving tag):
docker run --rm niceos/openjdk25:25.0.0 java -version
Use latest for dev:
docker run --rm niceos/openjdk25:latest java -version
Run your JAR:
docker run --rm -v "$PWD"/app.jar:/app/app.jar niceos/openjdk25:25.0.0 \
java -jar /app/app.jar
Docker Compose:
services:
java:
image: niceos/openjdk25:25.0.0
volumes:
- ./app.jar:/app/app.jar
command: ["java", "-jar", "/app/app.jar"]
Kubernetes (minimal Deployment):
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-java
spec:
replicas: 1
selector: { matchLabels: { app: my-java } }
template:
metadata: { labels: { app: my-java } }
spec:
securityContext: { runAsUser: 10001, runAsGroup: 10001 }
containers:
- name: app
image: niceos/openjdk25:25.0.0
args: ["java","-jar","/app/app.jar"]
volumeMounts:
- name: appjar
mountPath: /app/app.jar
subPath: app.jar
readinessProbe:
exec: { command: ["java","-version"] }
initialDelaySeconds: 5
periodSeconds: 15
volumes:
- name: appjar
configMap: { name: my-java-jar }
NiceOS OpenJDK 25 GA delivers a clean, production-ready Java 25 runtime on NiceOS Base — a Linux distribution built exclusively for containers. This is not “Java on a repackaged distro”; it’s Java on a container-first OS designed for minimalism, security, and reproducibility.
Core principles
Included:
Excluded:
/nicesoft/niceos/reports/
JAVA_TOOL_OPTIONS → portable JVM flagsJDK_JAVA_OPTIONS → alternative entryExamples:
-e JAVA_TOOL_OPTIONS="-XX:+ExitOnOutOfMemoryError -XX:MaxRAMPercentage=70"
-e JAVA_TOOL_OPTIONS="-XX:ActiveProcessorCount=2 -XX:InitialRAMPercentage=15 -XX:MaxRAMPercentage=70"
GC:
-XX:+UseZGC)Minimal Dockerfile:
FROM niceos/openjdk25:25.0.0
WORKDIR /app
COPY myapp.jar .
CMD ["java", "-jar", "myapp.jar"]
Multi-stage with Maven:
FROM maven:3-eclipse-temurin AS build
WORKDIR /src
COPY . .
RUN mvn -q -DskipTests package
FROM niceos/openjdk25:25.0.0
WORKDIR /app
COPY --from=build /src/target/*.jar /app/app.jar
ENV JAVA_TOOL_OPTIONS="-XX:+ExitOnOutOfMemoryError -XX:MaxRAMPercentage=70"
CMD ["java","-jar","/app/app.jar"]
25.0.0.NICEOS_ALLOW_ROOT=1 only if needed./nicesoft/niceos/reports/.x86_64.Apache License 2.0. Copyright © 2025 NiceSOFT LLC
25.0.0 in production (deterministic digest).JAVA_TOOL_OPTIONS.java -version).make-ca.Content type
Image
Digest
sha256:15a61f76f…
Size
258.4 MB
Last updated
12 months ago
docker pull niceos/openjdk25