AdoptOpenJDK提供的OpenJDK 9版本Docker镜像,包含多种操作系统(如Alpine、Ubuntu等)的构建版本,支持多架构,适用于Java应用的开发、测试与部署。
Official vs Non-Official Docker images
AdoptOpenJDK provides docker images in two different DockerHub repos
- DockerHub maintained images (aka official DockerHub images) at this https://hub.docker.com/_/adoptopenjdk.
- AdoptOpenJDK maintained images (this repo).
Both images use the same underlying Java binaries from AdoptOpenJDK, but they support different OS flavours as below. Also the official DockerHub images are updated for underlying OS updates as and when the OS fixes are available. The AdoptOpenJDK maintained images are rebuilt everyday.
- See Official Docker Images for the regular jdk and jre images based on Ubuntu and Windows.
- Use this repo for Alpine, CentOS, ClefOS, Debian, Debian-Slim, UBI and UBI-Minimal based images as well as Slim images for all supported OSes.
Supported tags and respective Dockerfile links
Release Builds
- https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/9/jdk/ubuntu/Dockerfile.hotspot.releases.full
- https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/9/jdk/ubuntu/Dockerfile.hotspot.releases.slim
- https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/9/jdk/alpine/Dockerfile.hotspot.releases.full
- https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/9/jdk/alpine/Dockerfile.hotspot.releases.slim
Nightly Builds
- https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/9/jdk/ubuntu/Dockerfile.hotspot.nightly.full
- https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/9/jdk/ubuntu/Dockerfile.hotspot.nightly.slim
- https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/9/jdk/alpine/Dockerfile.hotspot.nightly.full
- https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/9/jdk/alpine/Dockerfile.hotspot.nightly.slim
Quick reference
-
Where to get help:
Community support; Join AdoptOpenJDK Slack -
Where to report problems:
https://github.com/AdoptOpenJDK/openjdk-build/issues -
Supported architectures: (https://github.com/docker-library/official-images#architectures-other-than-amd64)
aarch64,amd64,ppc64le,s390x
Overview
Java™ is the world's leading programming language and platform. The code for Java is open source and available at http://openjdk.java.net/. AdoptOpenJDK provides prebuilt OpenJDK binaries from a fully open source set of https://github.com/AdoptOpenJDK/openjdk-build and infrastructure.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.
Multi-arch image
OpenJDK has multi-arch support so the same commands work on all supported architectures.
How to use this Image
To run a pre-built jar file with the latest Java 9 OpenJDK image, use the following commands:
dockerfileFROM adoptopenjdk/openjdk8:latest RUN mkdir /opt/app COPY japp.jar /opt/app CMD ["java", "-jar", "/opt/app/japp.jar"]
You can build and run the Docker image as shown in the following example:
console$ docker build -t japp . $ docker run -it --rm japp
To get a specific version of a docker image, add the build number as shown in the following example:
console$ docker run --rm -it adoptopenjdk/openjdk9:jdk-9.0.4.11-alpine java -version Picked up JAVA_TOOL_OPTIONS: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap openjdk version "9.0.4" OpenJDK Runtime Environment (build 9.0.4+11) OpenJDK 64-Bit Server VM (build 9.0.4+11, mixed mode)
License
The Dockerfiles and associated scripts are licensed under the http://www.apache.org/licenses/LICENSE-2.0.html.
Licenses for the products installed within the images:
- OpenJDK: The project license is http://openjdk.java.net/legal/gplv2+ce.html.
As with all Docker images, other software is likely to be included, which might be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.
adoptopenjdk 命名空间的其他可用镜像:
adoptopenjdk/openjdk8
adoptopenjdk/openjdk11
adoptopenjdk/openjdk14
adoptopenjdk/openjdk11-openj9
镜像拉取方式
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
轩辕镜像加速拉取命令点我查看更多 openjdk9 镜像标签
DockerHub 原生拉取命令
用户好评
来自真实用户的反馈,见证轩辕镜像的优质服务