Add eclipse-temurin and deprecate adoptopenjdk (#2008)

This commit is contained in:
George Adams 2021-08-13 22:29:35 +01:00 committed by GitHub
parent 0a0eb947e1
commit 4baab4b75b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 101 additions and 0 deletions

View File

@ -0,0 +1 @@
This image is officially deprecated in favor of [the `eclipse-temurin` image](https://hub.docker.com/_/eclipse-temurin/), and will receive no further updates after 2021-08-01 (Aug 01, 2021). Please adjust your usage accordingly.

View File

@ -0,0 +1 @@
Official Images for OpenJDK binaries built by Eclipse Temurin.

View File

@ -0,0 +1,90 @@
## Overview
The images in this repository contain OpenJDK binaries that are built by Eclipse Temurin.
# What is Eclipse Temurin ?
The Eclipse Temurin project provides code and processes that support the building of runtime binaries and associated technologies that are high performance, enterprise-caliber, cross-platform, open-source licensed, and Java SE TCK-tested for general use across the Java ecosystem.
# Images
Current there are only JDK (Java Developer Kit) images. On OpenJDK 11+ JRE's can be produced using `jlink` (see usage below).
### Multi-Arch Image
Docker Images for the following architectures are now available:
- `amd64`, `windows-amd64`, `arm64v8`, `ppc64le`
More architecures will be available shortly.
# How to use this Image
To run a pre-built jar file with the latest OpenJDK 11, use the following Dockerfile:
```dockerfile
FROM %%IMAGE%%:11
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
```
### Using a different base Image
If you are using a distribution that we don't provide an image for you can copy the JDK using a similar Dockerfile to the one below:
```dockerfile
# Example
FROM <base image>
ENV JAVA_HOME=/opt/java/openjdk
COPY --from=%%IMAGE%%:11 $JAVA_HOME $JAVA_HOME
ENV PATH="${JAVA_HOME}/bin:${PATH}"
```
### Creating a JRE using jlink
On OpenJDK 11+, a JRE can be generated using `jlink`, see the following Dockerfile:
```dockerfile
# Example of custom Java runtime using jlink in a multi-stage container build
FROM %%IMAGE%%:11 as jre-build
# Create a custom Java runtime
RUN $JAVA_HOME/bin/jlink \
--add-modules java.base \
--strip-debug \
--no-man-pages \
--no-header-files \
--compress=2 \
--output /javaruntime
# Define your base image
FROM debian:buster-slim
ENV JAVA_HOME=/opt/java/openjdk
ENV PATH "${JAVA_HOME}/bin:${PATH}"
COPY --from=jre-build /javaruntime $JAVA_HOME
# Continue with your application deployment
RUN mkdir /opt/app
COPY japp.jar /opt/app
CMD ["java", "-jar", "/opt/app/japp.jar"]
```
If you want to place the jar file on the host file system instead of inside the container, you can mount the host path onto the container by using the following commands:
```dockerfile
FROM %%IMAGE%%:11.0.12_7-jdk
CMD ["java", "-jar", "/opt/app/japp.jar"]
```
```console
docker build -t japp .
docker run -it -v /path/on/host/system/jars:/opt/app japp
```

View File

@ -0,0 +1 @@
[Adoptium Slack](https://adoptium.net/slack.html)

View File

@ -0,0 +1 @@
https://github.com/adoptium/containers

View File

@ -0,0 +1 @@
[GitHub](%%GITHUB-REPO%%/issues); The [adoptium support](https://adoptium.net/support.html) page has more information on quality, roadmap and support levels for Eclipse Temurin builds;

View File

@ -0,0 +1,5 @@
The Dockerfiles and associated scripts are licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).
Licenses for the products installed within the images:
- OpenJDK: The project license is GNU GPL v2 with Classpath Exception.

BIN
eclipse-temurin/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -0,0 +1 @@
[Adoptium](%%GITHUB-REPO%%)