Skip to content

Commit 4baab4b

Browse files
authored
Add eclipse-temurin and deprecate adoptopenjdk (#2008)
1 parent 0a0eb94 commit 4baab4b

File tree

9 files changed

+101
-0
lines changed

9 files changed

+101
-0
lines changed

adoptopenjdk/deprecated.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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.

eclipse-temurin/README-short.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Official Images for OpenJDK binaries built by Eclipse Temurin.

eclipse-temurin/content.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
## Overview
2+
3+
The images in this repository contain OpenJDK binaries that are built by Eclipse Temurin.
4+
5+
# What is Eclipse Temurin ?
6+
7+
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.
8+
9+
# Images
10+
11+
Current there are only JDK (Java Developer Kit) images. On OpenJDK 11+ JRE's can be produced using `jlink` (see usage below).
12+
13+
### Multi-Arch Image
14+
15+
Docker Images for the following architectures are now available:
16+
17+
- `amd64`, `windows-amd64`, `arm64v8`, `ppc64le`
18+
19+
More architecures will be available shortly.
20+
21+
# How to use this Image
22+
23+
To run a pre-built jar file with the latest OpenJDK 11, use the following Dockerfile:
24+
25+
```dockerfile
26+
FROM %%IMAGE%%:11
27+
RUN mkdir /opt/app
28+
COPY japp.jar /opt/app
29+
CMD ["java", "-jar", "/opt/app/japp.jar"]
30+
```
31+
32+
You can build and run the Docker Image as shown in the following example:
33+
34+
```console
35+
docker build -t japp .
36+
docker run -it --rm japp
37+
```
38+
39+
### Using a different base Image
40+
41+
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:
42+
43+
```dockerfile
44+
# Example
45+
FROM <base image>
46+
ENV JAVA_HOME=/opt/java/openjdk
47+
COPY --from=%%IMAGE%%:11 $JAVA_HOME $JAVA_HOME
48+
ENV PATH="${JAVA_HOME}/bin:${PATH}"
49+
```
50+
51+
### Creating a JRE using jlink
52+
53+
On OpenJDK 11+, a JRE can be generated using `jlink`, see the following Dockerfile:
54+
55+
```dockerfile
56+
# Example of custom Java runtime using jlink in a multi-stage container build
57+
FROM %%IMAGE%%:11 as jre-build
58+
59+
# Create a custom Java runtime
60+
RUN $JAVA_HOME/bin/jlink \
61+
--add-modules java.base \
62+
--strip-debug \
63+
--no-man-pages \
64+
--no-header-files \
65+
--compress=2 \
66+
--output /javaruntime
67+
68+
# Define your base image
69+
FROM debian:buster-slim
70+
ENV JAVA_HOME=/opt/java/openjdk
71+
ENV PATH "${JAVA_HOME}/bin:${PATH}"
72+
COPY --from=jre-build /javaruntime $JAVA_HOME
73+
74+
# Continue with your application deployment
75+
RUN mkdir /opt/app
76+
COPY japp.jar /opt/app
77+
CMD ["java", "-jar", "/opt/app/japp.jar"]
78+
```
79+
80+
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:
81+
82+
```dockerfile
83+
FROM %%IMAGE%%:11.0.12_7-jdk
84+
CMD ["java", "-jar", "/opt/app/japp.jar"]
85+
```
86+
87+
```console
88+
docker build -t japp .
89+
docker run -it -v /path/on/host/system/jars:/opt/app japp
90+
```

eclipse-temurin/get-help.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[Adoptium Slack](https://adoptium.net/slack.html)

eclipse-temurin/github-repo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://github.com/adoptium/containers

eclipse-temurin/issues.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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;

eclipse-temurin/license.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
The Dockerfiles and associated scripts are licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).
2+
3+
Licenses for the products installed within the images:
4+
5+
- OpenJDK: The project license is GNU GPL v2 with Classpath Exception.

eclipse-temurin/logo.png

32.2 KB
Loading

eclipse-temurin/maintainer.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[Adoptium](%%GITHUB-REPO%%)

0 commit comments

Comments
 (0)