-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add JVM default options (#1087)
* feat: add JVM default options * build: user path_to_jar env variable * build: use ZGC instead of ParallelGC * build; change user of docker img * bump: version to 3.24.1 * build: fix sonar lint
- Loading branch information
1 parent
d1a3b30
commit d112d7b
Showing
2 changed files
with
18 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
FROM eclipse-temurin:21.0.3_9-jre | ||
FROM eclipse-temurin:21.0.4_7-jre | ||
|
||
ENV PATH_TO_JAR=/opt/eno-ws/eno-ws.jar | ||
WORKDIR /opt/eno-ws/ | ||
COPY ./eno-ws/build/libs/*.jar /opt/eno-ws/eno-ws.jar | ||
EXPOSE 8080 | ||
ADD ./eno-ws/build/libs/*.jar $PATH_TO_JAR | ||
|
||
ENV JAVA_TOOL_OPTIONS_DEFAULT \ | ||
-XX:MaxRAMPercentage=75 \ | ||
-XX:+UseZGC | ||
|
||
ENV JAVA_USER_ID=10001 | ||
ENV JAVA_USER=java | ||
RUN groupadd -g "$JAVA_USER_ID" "$JAVA_USER" && \ | ||
useradd -r -u "$JAVA_USER_ID" -g "$JAVA_USER" "$JAVA_USER" | ||
|
||
RUN addgroup eno | ||
RUN useradd -g eno eno | ||
USER eno | ||
USER $JAVA_USER_ID | ||
|
||
ENTRYPOINT ["java", "-jar", "/opt/eno-ws/eno-ws.jar"] | ||
ENTRYPOINT [ "/bin/sh", "-c", \ | ||
"export JAVA_TOOL_OPTIONS=\"$JAVA_TOOL_OPTIONS_DEFAULT $JAVA_TOOL_OPTIONS\"; \ | ||
exec java -jar $PATH_TO_JAR" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters