Skip to content

Commit

Permalink
use jvm at this point.
Browse files Browse the repository at this point in the history
  • Loading branch information
mishraomp committed Oct 13, 2023
1 parent 5b3d7bf commit b0bb8f2
Showing 1 changed file with 33 additions and 11 deletions.
44 changes: 33 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,39 @@ WORKDIR /code
RUN chmod +x mvnw
RUN ./mvnw -B org.apache.maven.plugins:maven-dependency-plugin:3.1.2:go-offline
COPY src /code/src
RUN ./mvnw package -Pnative -DskipTests
#RUN ./mvnw package -Pnative -DskipTests
RUN ./mvnw package -DskipTests
HEALTHCHECK --interval=300s --timeout=30s CMD ./mvnw --version || exit 1
###
FROM quay.io/quarkus/quarkus-micro-image:2.0
WORKDIR /work/
RUN chown 1001 /work \
&& chmod "g+rwX" /work \
&& chown 1001:root /work
COPY --chown=1001:root --from=build /code/target/*-runner /work/application

EXPOSE 3000
USER 1001
#FROM quay.io/quarkus/quarkus-micro-image:2.0
#WORKDIR /work/
#RUN chown 1001 /work \
# && chmod "g+rwX" /work \
# && chown 1001:root /work
#COPY --chown=1001:root --from=build /code/target/*-runner /work/application

#EXPOSE 3000
#USER 1001
#HEALTHCHECK --interval=300s --timeout=3s CMD curl -f http://localhost:3000/ || exit 1
#CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]




FROM registry.access.redhat.com/ubi8/openjdk-17:1.16

ENV LANGUAGE='en_US:en'


# We make four distinct layers so if there are application changes the library layers can be re-used
COPY --chown=185 target/quarkus-app/lib/ /deployments/lib/
COPY --chown=185 target/quarkus-app/*.jar /deployments/
COPY --chown=185 target/quarkus-app/app/ /deployments/app/
COPY --chown=185 target/quarkus-app/quarkus/ /deployments/quarkus/

EXPOSE 8080
USER 185
ENV JAVA_OPTS="-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
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]
ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ]

0 comments on commit b0bb8f2

Please sign in to comment.