diff --git a/Dockerfile b/Dockerfile index ed4a254..7c59c87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,14 +2,20 @@ FROM eclipse-temurin:21.0.4_7-jre ENV LANG=fr_FR.UTF-8 LANGUAGE=fr_FR:fr LC_ALL=fr_FR.UTF-8 -ENV PATH_TO_JAR=/application/pe-bo.jar -WORKDIR application -RUN rm -rf /application +ENV PATH_TO_JAR=/opt/pe/pe-bo.jar +WORKDIR /opt/pe/ ADD ./target/*.jar $PATH_TO_JAR ENV JAVA_TOOL_OPTIONS_DEFAULT \ -XX:MaxRAMPercentage=75 \ - -XX:+UseParallelGC + -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\"; \ diff --git a/pom.xml b/pom.xml index bcc5a7d..60742ac 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fr.insee public-enemy-api - 2.3.8 + 2.3.9 jar public-enemy-api