Skip to content

Commit 19c5c2c

Browse files
committed
build: Use JRE instead of JDK for final Docker image
Use Eclipse Temurin JRE 21 instead of JDK 21 in Dockerfile. This means that the final Docker image for the application will be take up less space. The JDK is for development and we do not need to use it for built Docker images. The JRE is all that we need for running the application.
1 parent be12161 commit 19c5c2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ COPY . .
2222
# Exclude tests to speed up the build.
2323
RUN ./gradlew --no-daemon :api:clean :api:build -x test
2424

25-
# Stage 2: Package the application into a runtime image using temurin JDK 21.
26-
FROM eclipse-temurin:21.0.8_9-jdk
25+
# Stage 2: Package the application into a runtime image using temurin JRE 21.
26+
FROM eclipse-temurin:21.0.8_9-jre-jammy
2727
WORKDIR /app
2828

2929
# Copy the generated jar from the builder stage.

0 commit comments

Comments
 (0)