-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: non-root- & docker jvm options (#202)
* build: non-root & jvm opts docker * bump: version to 2.4.4
- Loading branch information
1 parent
e6aa1a9
commit 1e485f6
Showing
2 changed files
with
18 additions
and
3 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,5 +1,20 @@ | ||
FROM eclipse-temurin:17-jre | ||
|
||
ENV PATH_TO_JAR=/opt/eno-ws/eno-ws.jar | ||
WORKDIR /opt/eno-ws/ | ||
COPY ./target/*.jar /opt/eno-ws/eno-ws.jar | ||
ENTRYPOINT ["java", "-jar", "/opt/eno-ws/eno-ws.jar"] | ||
ADD ./target/*.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" | ||
|
||
USER $JAVA_USER_ID | ||
|
||
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