Skip to content

Commit

Permalink
Support: Java 21 (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
samruddhikhandale authored Sep 28, 2023
1 parent f96bf4f commit aa11060
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/java/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This Dockerfile uses separate build arguments instead of VARIANT
ARG TARGET_JAVA_VERSION=11
ARG TARGET_JAVA_VERSION=21
ARG BASE_IMAGE_VERSION_CODENAME=bookworm
FROM mcr.microsoft.com/devcontainers/base:${BASE_IMAGE_VERSION_CODENAME}

Expand Down
3 changes: 2 additions & 1 deletion src/java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
| *Categories* | Core, Languages |
| *Image type* | Dockerfile |
| *Published images* | mcr.microsoft.com/devcontainers/java |
| *Available image variants* | 11 / 11-bookworm, 17 / 17-bookworm, 11-bullseye, 17-bullseye, 11-buster, 17-buster ([full list](https://mcr.microsoft.com/v2/devcontainers/java/tags/list)) |
| *Available image variants* | 11 / 11-bookworm, 17 / 17-bookworm, 21 / 21-bookworm, 11-bullseye, 17-bullseye, 21-bullseye, 11-buster, 17-buster, 21-buster ([full list](https://mcr.microsoft.com/v2/devcontainers/java/tags/list)) |
| *Published image architecture(s)* | x86-64, arm64/aarch64 for `bookworm`, and `bullseye` variants |
| *Container host OS support* | Linux, macOS, Windows |
| *Container OS* | Debian |
Expand All @@ -22,6 +22,7 @@ See **[history](history)** for information on the contents of published images.
You can directly reference pre-built versions of `Dockerfile` by using the `image` property in `.devcontainer/devcontainer.json` or updating the `FROM` statement in your own `Dockerfile` to one of the following. An example `Dockerfile` is included in this repository.

- `mcr.microsoft.com/devcontainers/java` (latest)
- `mcr.microsoft.com/devcontainers/java:21` (or `21-bookworm`, `21-bullseye`, `21-buster` to pin to an OS version)
- `mcr.microsoft.com/devcontainers/java:11` (or `17-bookworm`, `11-bullseye`, `11-buster` to pin to an OS version)
- `mcr.microsoft.com/devcontainers/java:17` (or `17-bookworm`, `17-bullseye`, `17-buster` to pin to an OS version)

Expand Down
50 changes: 43 additions & 7 deletions src/java/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"version": "1.0.3",
"variants": [
"21-bookworm",
"21-bullseye",
"21-buster",
"17-bookworm",
"17-bullseye",
"17-buster",
Expand All @@ -9,11 +12,15 @@
"11-buster"
],
"build": {
"latest": "17-bookworm",
"latest": "21-bookworm",
"rootDistro": "debian",
"parent": "base-debian",
"idMismatch": "true",
"variantBuildArgs": {
"21-bookworm": {
"TARGET_JAVA_VERSION": "21",
"BASE_IMAGE_VERSION_CODENAME": "bookworm"
},
"17-bookworm": {
"TARGET_JAVA_VERSION": "17",
"BASE_IMAGE_VERSION_CODENAME": "bookworm"
Expand All @@ -22,6 +29,10 @@
"TARGET_JAVA_VERSION": "11",
"BASE_IMAGE_VERSION_CODENAME": "bookworm"
},
"21-bullseye": {
"TARGET_JAVA_VERSION": "21",
"BASE_IMAGE_VERSION_CODENAME": "bullseye"
},
"17-bullseye": {
"TARGET_JAVA_VERSION": "17",
"BASE_IMAGE_VERSION_CODENAME": "bullseye"
Expand All @@ -30,6 +41,10 @@
"TARGET_JAVA_VERSION": "11",
"BASE_IMAGE_VERSION_CODENAME": "bullseye"
},
"21-buster": {
"TARGET_JAVA_VERSION": "21",
"BASE_IMAGE_VERSION_CODENAME": "buster"
},
"17-buster": {
"TARGET_JAVA_VERSION": "17",
"BASE_IMAGE_VERSION_CODENAME": "buster"
Expand All @@ -40,6 +55,10 @@
}
},
"architectures": {
"21-bookworm": [
"linux/amd64",
"linux/arm64"
],
"17-bookworm": [
"linux/amd64",
"linux/arm64"
Expand All @@ -48,6 +67,10 @@
"linux/amd64",
"linux/arm64"
],
"21-bullseye": [
"linux/amd64",
"linux/arm64"
],
"17-bullseye": [
"linux/amd64",
"linux/arm64"
Expand All @@ -56,6 +79,9 @@
"linux/amd64",
"linux/arm64"
],
"21-buster": [
"linux/amd64"
],
"17-buster": [
"linux/amd64"
],
Expand All @@ -67,26 +93,36 @@
"java:${VERSION}-${VARIANT}"
],
"variantTags": {
"21-bookworm": [
"java:${VERSION}-21",
"java:${VERSION}-21-jdk-bookworm",
"java:${VERSION}-bookworm"
],
"17-bookworm": [
"java:${VERSION}-17",
"java:${VERSION}-17-jdk-bookworm",
"java:${VERSION}-bookworm"
"java:${VERSION}-17-jdk-bookworm"
],
"11-bookworm": [
"java:${VERSION}-11",
"java:${VERSION}-11-jdk-bookworm"
],
"17-bullseye": [
"java:${VERSION}-17-jdk-bullseye",
"21-bullseye": [
"java:${VERSION}-21-jdk-bullseye",
"java:${VERSION}-bullseye"
],
"17-bullseye": [
"java:${VERSION}-17-jdk-bullseye"
],
"11-bullseye": [
"java:${VERSION}-11-jdk-bullseye"
],
"17-jdk-buster": [
"java:${VERSION}-17-jdk-buster",
"21-jdk-buster": [
"java:${VERSION}-21-jdk-buster",
"java:${VERSION}-buster"
],
"17-jdk-buster": [
"java:${VERSION}-17-jdk-buster"
],
"11-buster": [
"java:${VERSION}-11-jdk-buster"
]
Expand Down

0 comments on commit aa11060

Please sign in to comment.