From 473374a6d70638a3eec2fc59a94dedad25b5ba94 Mon Sep 17 00:00:00 2001 From: Om Mishra <32200996+mishraomp@users.noreply.github.com> Date: Thu, 29 Aug 2024 16:30:08 -0700 Subject: [PATCH] feat: trying jvm mode to see metrics (#87) * Update Dockerfile * Update Dockerfile * Update Dockerfile * revert to native * fix Dockerfile --- Dockerfile | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 64613bc..8ba60f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,11 +13,18 @@ COPY src /code/src RUN ./mvnw versions:set -DnewVersion=${APP_VERSION} -f pom.xml -DskipTests -Dtests.skip=true -Dskip.unit.tests=true && \ ./mvnw versions:commit -f pom.xml -DskipTests -Dtests.skip=true -Dskip.unit.tests=true +### NATIVE BUILD RUN ./mvnw package -Pnative -DskipTests -#RUN ./mvnw package -DskipTests for JVM mode + +### JVM BUILD +#RUN ./mvnw package -DskipTests HEALTHCHECK --interval=300s --timeout=30s CMD ./mvnw --version || exit 1 + +### ### -FROM quay.io/quarkus/quarkus-micro-image:2.0 as deploy +### + +FROM quay.io/quarkus/quarkus-micro-image:2.0 AS deploy WORKDIR /work/ RUN chown 1001 /work \ && chmod "g+rwX" /work \ @@ -31,8 +38,8 @@ CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] -# -#FROM registry.access.redhat.com/ubi8/openjdk-17:1.16 +##### +#FROM registry.access.redhat.com/ubi8/openjdk-21:1.19 #ENV LANGUAGE='en_US:en' @@ -45,7 +52,7 @@ CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] #EXPOSE 8080 #USER 185 -#ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +#ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" #ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" -#HEALTHCHECK --interval=300s --timeout=3s CMD curl -f http://localhost:3000/ || exit 1 + #ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ]