-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (21 loc) · 893 Bytes
/
Dockerfile
File metadata and controls
31 lines (21 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Define your base image
FROM container-registry.oracle.com/java/openjdk:25-oraclelinux9 as jre-build
RUN $JAVA_HOME/bin/jlink \
--add-modules jdk.compiler,jdk.httpserver,<ADD_MODULES>\
--no-man-pages \
--no-header-files \
--compress=zip-9 \
--output javaruntime
# Define your base image
FROM container-registry.oracle.com/os/oraclelinux:9-slim
ENV JAVA_HOME /usr/java/openjdk-25
ENV PATH $JAVA_HOME/bin:$PATH
COPY --from=jre-build /javaruntime $JAVA_HOME
WORKDIR app
# Continue with your application deployment
COPY ./lib /app/lib
COPY ./D_bday_jlink/src/main /app
RUN $JAVA_HOME/bin/jfr configure jdk.CPUTimeSample#enabled=true && groupadd -r appuser && useradd -r -g appuser appuser
USER appuser
ENV JDK_JAVA_OPTIONS "--enable-preview"
ENTRYPOINT java --class-path 'lib/*' java/eu/ammbra/bday/Organizer.java "./resources/store/events.json" 8081