Skip to content

Commit 8e7456c

Browse files
committed
library-api: dockerfile fix
1 parent ad6be3a commit 8e7456c

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed
Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
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
32

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'
74

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/
1310

14-
# Set working directory and run the application
15-
WORKDIR $KOGITO_HOME/bin
1611
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"
1715

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

Comments
 (0)