Java OpenJDK-JDK and -JRE Docker images based on official images
10K+
OpenJDK JDK and JRE Docker images for Java 11, 17, 21 and 25 on Alpine, plus a Debian headless variant for Java 25 —
multi-platform for linux/amd64 and linux/arm64, rebuilt weekly.
Built on the official Docker, Alpine and Debian images and kept up to date by epicsoft LLC.
OpenJDK-JDK based on official image Docker in Docker (DinD) and indirectly on Alpine Linux.
This image is intended for building and can be used in a pipeline.
OpenJDK-JRE based on official images Alpine Linux.
This image is for the runtime environment.
OpenJDK-JDK and -JRE based on the official Debian slim image with the headless Java packages.
These images are for a glibc runtime environment, e.g. for native libraries that do not run on musl.
Headless means AWT is available for font rendering, image and PDF generation, but not for GUI windows.
The Debian JDK image is not based on Docker in Docker and contains no Docker CLI.
All images are published as multi-platform manifests for linux/amd64 and linux/arm64.
Docker automatically pulls the matching architecture.
jdk jdk25 jdk25.0.4 jdk25-latest jdk-latest
based on Docker DinD indirectly on Alpine with Java JDK 25 - build weekly
jre jre25 jre25.0.4 jre25-latest jre-latest latest
based on Alpine image with Java JRE 25 - build weekly
jdk-debian-headless jdk25-debian-headless jdk25.0.4-debian-headless jdk25-debian-headless-latest jdk-debian-headless-latest
based on Debian slim image with Java JDK 25 headless - build weekly
jre-debian-headless jre25-debian-headless jre25.0.4-debian-headless jre25-debian-headless-latest jre-debian-headless-latest
based on Debian slim image with Java JRE 25 headless - build weekly
jdk21 jdk21.0.12 jdk21-latest
based on Docker DinD indirectly on Alpine with Java JDK 21 - build weekly
jre21 jre21.0.12 jre21-latest
based on Alpine image with Java JRE 21 - build weekly
jdk17 jdk17.0.20 jdk17-latest
based on Docker DinD indirectly on Alpine with Java JDK 17 - build weekly
jre17 jre17.0.20 jre17-latest
based on Alpine image with Java JRE 17 - build weekly
jdk11 jdk11.0.32 jdk11-latest
based on Docker DinD indirectly on Alpine with Java JDK 11 - build weekly
jre11 jre11.0.32 jre11-latest
based on Alpine image with Java JRE 11 - build weekly
For older versions see subdirectories
Alpine packages are installed in the current image in the latest version - https://pkgs.alpinelinux.org/packages
Debian packages are installed in the current image in the latest version - https://packages.debian.org
Build a Java Gradle project in GitLab CI/CD pipeline
.gitlab-ci.yml
stages:
- build
variables:
VERSION: "1.0.0"
exampleProjectBuild:
stage: build
image: epicsoft/openjdk:jdk-latest
services:
- docker:dind
variables:
DOCKER_IMAGE: $CI_REGISTRY:$VERSION
JAVA_JAR_PATH: build/libs
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
after_script:
- docker logout $CI_REGISTRY
script:
- ./gradlew build --warning-mode all
- docker build -t $DOCKER_IMAGE . --build-arg JAR_FILE=$JAVA_JAR_PATH/exampleProject-${VERSION}.jar --build-arg VERSION=$VERSION --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
- docker push $DOCKER_IMAGE
FROM epicsoft/openjdk:jre-latest
ARG VERSION="development"
ARG BUILD_DATE="development"
LABEL org.label-schema.name="exampleProject" \
org.label-schema.description="Example project" \
org.label-schema.version="$VERSION" \
org.label-schema.schema-version="1.0" \
org.label-schema.build-date="$BUILD_DATE"
ENV JAVA_SERVER="-server" \
JAVA_DOCKER="-XX:+UseContainerSupport -XX:MaxRAMPercentage=80" \
JAVA_SECURITY="-Djava.security.egd=file:/dev/./urandom" \
JAVA_ENCODING="-Dfile.encoding=UTF-8" \
JAVA_TIMEZONE="-Duser.timezone=GMT" \
JAVA_ERROR="-XX:+ExitOnOutOfMemoryError" \
JAVA_OPTS=""
ARG JAR_FILE
COPY $JAR_FILE /app.jar
EXPOSE 8080
ENTRYPOINT [ "sh", "-c", "java $JAVA_SERVER $JAVA_DOCKER $JAVA_SECURITY $JAVA_ENCODING $JAVA_TIMEZONE $JAVA_ERROR $JAVA_OPTS -jar /app.jar" ]
Upstream support for these Java versions ends, the images are no longer updated afterwards - https://adoptium.net/support
The repository holds Dockerfiles only, everything is built by GitLab CI. Every Java release has its own directory
openjdk<major>/<version>/ with the Dockerfiles and a .gitlab-ci.yml for its build jobs. Older directories are kept as
history; the root .gitlab-ci.yml includes exactly one directory per major version.
jdk25.0.4, jre25.0.4, …) as multi-platform images with
docker buildx — the arm64 half is built under QEMU emulation — and check java --version on every platform.main only and copy those tags to the floating ones (jdk25, jre-latest, latest, …)
inside the registry, so the manifest list keeps all platforms.--pull --no-cache.openjdk<major>/<new version>/FROM and ALPINE_VERSION / DOCKER_VERSION / DEBIAN_VERSION),
JAVA_VERSION and the pinned Java package. The exact package revision comes from
pkgs.alpinelinux.org or packages.debian.org
and must exist for both x86_64 and aarch64.gitlab-ci.yml bump OPENJDK<major>_IMAGE_TAG.gitlab-ci.yml point the include: entry at the new directoryA single-platform build from the repository root catches a wrong package pin right away:
docker build --pull --no-cache -t openjdk-check -f openjdk25/25.0.4/jre.Dockerfile . \
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
docker run --rm openjdk-check java --version
MIT License see LICENSE
Please note that the MIT license only applies to the files created by epicsoft LLC. Other software may be licensed under other licenses.
Content type
Image
Digest
sha256:144adf922…
Size
94.2 MB
Last updated
2 minutes ago
docker pull epicsoft/openjdk