|
1 | | -# Use Kogito runtime image with Java 17 |
2 | | -FROM quay.io/kiegroup/kogito-runtime-jvm:1.44.1 |
| 1 | +FROM registry.access.redhat.com/ubi9/openjdk-17:1.20 |
3 | 2 |
|
4 | | -ENV RUNTIME_TYPE=quarkus |
5 | | -ENV JAVA_HOME=/usr/lib/jvm/java-17 |
6 | | -ENV PATH=$JAVA_HOME/bin:$PATH |
| 3 | +ENV LANGUAGE='en_US:en' |
7 | 4 |
|
8 | | -# Copy the pre-built application (built by GitHub Actions before Docker) |
9 | | -COPY target/quarkus-app/lib/ $KOGITO_HOME/bin/lib/ |
10 | | -COPY target/quarkus-app/*.jar $KOGITO_HOME/bin/ |
11 | | -COPY target/quarkus-app/app/ $KOGITO_HOME/bin/app/ |
12 | | -COPY target/quarkus-app/quarkus/ $KOGITO_HOME/bin/quarkus/ |
| 5 | +# We make four distinct layers so if there are application changes the library layers can be re-used |
| 6 | +COPY --chown=185 target/quarkus-app/lib/ /deployments/lib/ |
| 7 | +COPY --chown=185 target/quarkus-app/*.jar /deployments/ |
| 8 | +COPY --chown=185 target/quarkus-app/app/ /deployments/app/ |
| 9 | +COPY --chown=185 target/quarkus-app/quarkus/ /deployments/quarkus/ |
13 | 10 |
|
14 | | -# Set working directory and run the application |
15 | | -WORKDIR $KOGITO_HOME/bin |
16 | 11 | EXPOSE 8080 |
| 12 | +USER 185 |
| 13 | +ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=${PORT:-8080} -Djava.util.logging.manager=org.jboss.logmanager.LogManager" |
| 14 | +ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" |
17 | 15 |
|
18 | | -# Configure Quarkus to listen on 0.0.0.0 and use PORT env var from Cloud Run |
19 | | -ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=${PORT:-8080} -Djava.util.logging.manager=org.jboss.logmanager.LogManager" |
20 | | - |
21 | | -CMD ["sh", "-c", "java ${JAVA_OPTS} -jar quarkus-run.jar"] |
| 16 | +ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ] |
0 commit comments