Skip to content

Commit aa11060

Browse files
Support: Java 21 (#770)
1 parent f96bf4f commit aa11060

File tree

3 files changed

+46
-9
lines changed

3 files changed

+46
-9
lines changed

src/java/.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This Dockerfile uses separate build arguments instead of VARIANT
2-
ARG TARGET_JAVA_VERSION=11
2+
ARG TARGET_JAVA_VERSION=21
33
ARG BASE_IMAGE_VERSION_CODENAME=bookworm
44
FROM mcr.microsoft.com/devcontainers/base:${BASE_IMAGE_VERSION_CODENAME}
55

src/java/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
| *Categories* | Core, Languages |
1010
| *Image type* | Dockerfile |
1111
| *Published images* | mcr.microsoft.com/devcontainers/java |
12-
| *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)) |
12+
| *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)) |
1313
| *Published image architecture(s)* | x86-64, arm64/aarch64 for `bookworm`, and `bullseye` variants |
1414
| *Container host OS support* | Linux, macOS, Windows |
1515
| *Container OS* | Debian |
@@ -22,6 +22,7 @@ See **[history](history)** for information on the contents of published images.
2222
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.
2323

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

src/java/manifest.json

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"version": "1.0.3",
33
"variants": [
4+
"21-bookworm",
5+
"21-bullseye",
6+
"21-buster",
47
"17-bookworm",
58
"17-bullseye",
69
"17-buster",
@@ -9,11 +12,15 @@
912
"11-buster"
1013
],
1114
"build": {
12-
"latest": "17-bookworm",
15+
"latest": "21-bookworm",
1316
"rootDistro": "debian",
1417
"parent": "base-debian",
1518
"idMismatch": "true",
1619
"variantBuildArgs": {
20+
"21-bookworm": {
21+
"TARGET_JAVA_VERSION": "21",
22+
"BASE_IMAGE_VERSION_CODENAME": "bookworm"
23+
},
1724
"17-bookworm": {
1825
"TARGET_JAVA_VERSION": "17",
1926
"BASE_IMAGE_VERSION_CODENAME": "bookworm"
@@ -22,6 +29,10 @@
2229
"TARGET_JAVA_VERSION": "11",
2330
"BASE_IMAGE_VERSION_CODENAME": "bookworm"
2431
},
32+
"21-bullseye": {
33+
"TARGET_JAVA_VERSION": "21",
34+
"BASE_IMAGE_VERSION_CODENAME": "bullseye"
35+
},
2536
"17-bullseye": {
2637
"TARGET_JAVA_VERSION": "17",
2738
"BASE_IMAGE_VERSION_CODENAME": "bullseye"
@@ -30,6 +41,10 @@
3041
"TARGET_JAVA_VERSION": "11",
3142
"BASE_IMAGE_VERSION_CODENAME": "bullseye"
3243
},
44+
"21-buster": {
45+
"TARGET_JAVA_VERSION": "21",
46+
"BASE_IMAGE_VERSION_CODENAME": "buster"
47+
},
3348
"17-buster": {
3449
"TARGET_JAVA_VERSION": "17",
3550
"BASE_IMAGE_VERSION_CODENAME": "buster"
@@ -40,6 +55,10 @@
4055
}
4156
},
4257
"architectures": {
58+
"21-bookworm": [
59+
"linux/amd64",
60+
"linux/arm64"
61+
],
4362
"17-bookworm": [
4463
"linux/amd64",
4564
"linux/arm64"
@@ -48,6 +67,10 @@
4867
"linux/amd64",
4968
"linux/arm64"
5069
],
70+
"21-bullseye": [
71+
"linux/amd64",
72+
"linux/arm64"
73+
],
5174
"17-bullseye": [
5275
"linux/amd64",
5376
"linux/arm64"
@@ -56,6 +79,9 @@
5679
"linux/amd64",
5780
"linux/arm64"
5881
],
82+
"21-buster": [
83+
"linux/amd64"
84+
],
5985
"17-buster": [
6086
"linux/amd64"
6187
],
@@ -67,26 +93,36 @@
6793
"java:${VERSION}-${VARIANT}"
6894
],
6995
"variantTags": {
96+
"21-bookworm": [
97+
"java:${VERSION}-21",
98+
"java:${VERSION}-21-jdk-bookworm",
99+
"java:${VERSION}-bookworm"
100+
],
70101
"17-bookworm": [
71102
"java:${VERSION}-17",
72-
"java:${VERSION}-17-jdk-bookworm",
73-
"java:${VERSION}-bookworm"
103+
"java:${VERSION}-17-jdk-bookworm"
74104
],
75105
"11-bookworm": [
76106
"java:${VERSION}-11",
77107
"java:${VERSION}-11-jdk-bookworm"
78108
],
79-
"17-bullseye": [
80-
"java:${VERSION}-17-jdk-bullseye",
109+
"21-bullseye": [
110+
"java:${VERSION}-21-jdk-bullseye",
81111
"java:${VERSION}-bullseye"
82112
],
113+
"17-bullseye": [
114+
"java:${VERSION}-17-jdk-bullseye"
115+
],
83116
"11-bullseye": [
84117
"java:${VERSION}-11-jdk-bullseye"
85118
],
86-
"17-jdk-buster": [
87-
"java:${VERSION}-17-jdk-buster",
119+
"21-jdk-buster": [
120+
"java:${VERSION}-21-jdk-buster",
88121
"java:${VERSION}-buster"
89122
],
123+
"17-jdk-buster": [
124+
"java:${VERSION}-17-jdk-buster"
125+
],
90126
"11-buster": [
91127
"java:${VERSION}-11-jdk-buster"
92128
]

0 commit comments

Comments
 (0)