Skip to content

Commit d696a40

Browse files
committed
Use temurin base image
1 parent aaea41d commit d696a40

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

Dockerfile

+1-22
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,6 @@
11
# bytebin Dockerfile
22
# Copyright (c) lucko - licenced MIT
33

4-
# --------------
5-
# BUILD JRE STAGE
6-
# --------------
7-
FROM alpine as build-jre
8-
RUN apk add --no-cache openjdk21 binutils
9-
10-
# create a minimal JRE
11-
RUN jlink \
12-
--add-modules java.base,java.logging,java.xml,java.desktop,java.management,java.sql,java.naming,jdk.unsupported \
13-
--strip-debug \
14-
--no-man-pages \
15-
--no-header-files \
16-
--compress=2 \
17-
--output /jre
18-
19-
204
# --------------
215
# BUILD PROJECT STAGE
226
# --------------
@@ -33,12 +17,7 @@ RUN mvn --no-transfer-progress -B package
3317
# --------------
3418
# RUN STAGE
3519
# --------------
36-
FROM alpine
37-
38-
# copy JRE from build stage
39-
ENV JAVA_HOME=/opt/java
40-
ENV PATH "${JAVA_HOME}/bin:${PATH}"
41-
COPY --from=build-jre /jre $JAVA_HOME
20+
FROM eclipse-temurin:21-alpine
4221

4322
RUN addgroup -S bytebin && adduser -S -G bytebin bytebin
4423
USER bytebin

0 commit comments

Comments
 (0)