Skip to content

Commit 54e4ef5

Browse files
committed
add java 21
1 parent 04fabb3 commit 54e4ef5

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

content/guides/java/containerize.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ WARNING: The following Docker files already exist in this directory:
6868
? Do you want to overwrite them? Yes
6969
? What application platform does your project use? Java
7070
? What's the relative directory (with a leading .) for your app? ./src
71-
? What version of Java do you want to use? 17
71+
? What version of Java do you want to use? 21
7272
? What port does your server listen on? 8080
7373
```
7474

@@ -98,7 +98,7 @@ Create a file named `Dockerfile` with the following contents.
9898
################################################################################
9999

100100
# Create a stage for resolving and downloading dependencies.
101-
FROM eclipse-temurin:17-jdk-jammy as deps
101+
FROM eclipse-temurin:21-jre-jammy as deps
102102

103103
WORKDIR /build
104104

@@ -155,7 +155,7 @@ RUN java -Djarmode=layertools -jar target/app.jar extract --destination target/e
155155
# most recent version of that tag when you build your Dockerfile.
156156
# If reproducability is important, consider using a specific digest SHA, like
157157
# eclipse-temurin@sha256:99cede493dfd88720b610eb8077c8688d3cca50003d76d1d539b0efc8cca72b4.
158-
FROM eclipse-temurin:17-jre-jammy AS final
158+
FROM eclipse-temurin:21-jre-jammy AS final
159159

160160
# Create a non-privileged user that the app will run under.
161161
# See https://docs.docker.com/go/dockerfile-user-best-practices/

content/guides/java/develop.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Replace the contents of your Dockerfile with the following.
121121
```dockerfile {hl_lines="22-29"}
122122
# syntax=docker/dockerfile:1
123123
124-
FROM eclipse-temurin:17-jdk-jammy as deps
124+
FROM eclipse-temurin:21-jdk-jammy as deps
125125
WORKDIR /build
126126
COPY --chmod=0755 mvnw mvnw
127127
COPY .mvn/ .mvn/
@@ -149,7 +149,7 @@ RUN cp -r /build/target/extracted/application/. ./
149149
ENV JAVA_TOOL_OPTIONS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000
150150
CMD [ "java", "-Dspring.profiles.active=postgres", "org.springframework.boot.loader.launch.JarLauncher" ]
151151
152-
FROM eclipse-temurin:17-jre-jammy AS final
152+
FROM eclipse-temurin:21-jre-jammy AS final
153153
ARG UID=10001
154154
RUN adduser \
155155
--disabled-password \

content/guides/java/run-tests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Replace the contents of your Dockerfile with the following.
2525
```dockerfile {hl_lines="3-19"}
2626
# syntax=docker/dockerfile:1
2727

28-
FROM eclipse-temurin:17-jdk-jammy as base
28+
FROM eclipse-temurin:21-jdk-jammy as base
2929
WORKDIR /build
3030
COPY --chmod=0755 mvnw mvnw
3131
COPY .mvn/ .mvn/
@@ -64,7 +64,7 @@ RUN cp -r /build/target/extracted/application/. ./
6464
ENV JAVA_TOOL_OPTIONS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000"
6565
CMD [ "java", "-Dspring.profiles.active=postgres", "org.springframework.boot.loader.launch.JarLauncher" ]
6666

67-
FROM eclipse-temurin:17-jre-jammy AS final
67+
FROM eclipse-temurin:21-jre-jammy AS final
6868
ARG UID=10001
6969
RUN adduser \
7070
--disabled-password \

0 commit comments

Comments
 (0)