#### # This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode # # Before building the container image run: # # mvn package # # Then, build the image with: # # docker build -f src/main/docker/Dockerfile.jvm -t quarkus/rest-client-quickstart-jvm . # # Then run the container using: # # docker run -i --rm -p 8080:8080 quarkus/rest-client-quickstart-jvm # # If you want to include the debug port into your docker image # you will have to expose the debug port (default 5005) like this : EXPOSE 8080 5050 # # Then run the container using : # # docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/rest-client-quickstart-jvm # ### #FROM artifactory.intern.gec.io/docker/eclipse-temurin:17-alpine FROM nexus.alm.oncite.io/docker/ubi9/openjdk-21:1.20 #ARG RUN_JAVA_VERSION=1.3.8 ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' # Install java and the run-java script # Also set up permissions for user `1001` #RUN apk add --no-cache curl ca-certificates \ # && mkdir /deployments \ # && chown 1001 /deployments \ # && chmod "g+rwX" /deployments \ # && chown 1001:root /deployments \ # && curl https://repo1.maven.org/maven2/io/fabric8/run-java-sh/${RUN_JAVA_VERSION}/run-java-sh-${RUN_JAVA_VERSION}-sh.sh -o /deployments/run-java.sh \ # && chown 1001 /deployments/run-java.sh \ # && chmod 540 /deployments/run-java.sh \ # && echo "securerandom.source=file:/dev/urandom" >> $JAVA_HOME/lib/security/java.security # Configure the JAVA_OPTIONS, you can add -XshowSettings:vm to also display the heap size. #ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" 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 5005 #USER 1001 #ENTRYPOINT [ "/deployments/run-java.sh" ] 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"