When packaging using Openshift extension and s2i, created image run not find quarkus application on start.
See original GitHub issueDescribe the bug When packaging an Quarkus application using the s2i Openshift extension. The build docker image, can not find the quarkus application in docker image /deployment folder and thus cannot start the application
Expected behavior When running the built docker image with following command: docker run namespace/openshift-s2i-issue:1.0.0 It is expected that the Quarkus application starts.
Actual behavior We get an error saying that the java (Quarkus) application cannot be found in /deployments folder: /usr/local/s2i/run: line 15: /opt/jboss/container/maven/default//scl-enable-maven: No such file or directory Starting the Java application using /opt/jboss/container/java/run/run-java.sh … ERROR Neither $JAVA_MAIN_CLASS nor $JAVA_APP_JAR is set and 0 JARs found in /deployments (1 expected) INFO exec java -javaagent:/usr/share/java/jolokia-jvm-agent/jolokia-jvm.jar=config=/opt/jboss/container/jolokia/etc/jolokia.properties -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m -XX:+ExitOnOutOfMemoryError -cp “.” -jar Error: -jar requires jar file specification Usage: java [options] <mainclass> [args…] . . .
To Reproduce Link to reproducer project
Steps to reproduce the behavior:
- oc login …
- ./mvnw -Dquarkus.container-image.build=true -Dquarkus.container-image.tag=1.0.0 -Dproject.version=1.0.0 -Dquarkus.kubernetes-client.trust-certs=true -Dquarkus.profile=prod -Dquarkus.package.type=fast-jar clean package
- docker run <URL for registry>/<project/namespace>/openshift-s2i-issue:1.0.0
Configuration
# NA
Screenshots NA
Environment (please complete the following information):
- CentOS 7 and Fedora 32
- Redhat OpenJDK 11.0.9.1+11
- Quarkus version : 1.10.5
- Maven version 3.6.3
- base s2i image: registry.access.redhat.com/ubi8/openjdk-11
Additional context The README.md also describes the issue, in a little more detail.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Hi Georgios
I finally got around testing it again. And I have now tested will all three package types. And so far it seems to works as intended.
I’m closing as it worked with Quarkus
1.11.3.Final