Deploying quarkus on OpenShift (building on Mac)

201 views
Skip to first unread message

Brand Bintley

unread,
May 18, 2021, 7:40:01 PM5/18/21
to Quarkus Development mailing list
I am building the getting started example on a mac notebook and I want to deploy on OpenShift sandbox.

I keep getting the following error in the POD logs: standard_init_linux.go:219: exec user process caused: exec format error

My guess is that the image that is created is targeted at the OSX operating system. My application.properties is exactly this:

quarkus.kubernetes-client.trust-certs=true

quarkus.kubernetes.deploy=true

quarkus.kubernetes.deployment-target=openshift

quarkus.openshift.build-strategy=docker

quarkus.openshift.expose=true

quarkus.s2i.base-jvm-image=registry.access.redhat.com/openjdk/openjdk-11-rhel7


And my build command is this:


mvn clean package -Pnative -Dquarkus.package.uber-jar=false -e -f .


What should I be doing differently?

Thanks.

Brand Bintley

unread,
May 18, 2021, 8:19:16 PM5/18/21
to Quarkus Development mailing list
It turns out the issue was the addition of the following in the command: -Pnative.
The working setting is:

application.properties:

quarkus.kubernetes.deploy=true


Command:
mvn clean package

Ken Finnigan

unread,
May 18, 2021, 8:19:34 PM5/18/21
to brand....@gmail.com, Quarkus Development mailing list
You need to run the native image build in Docker to create a Linux executable for the container.

For that, add `-Dquarkus.native.container-build=true` to the Maven build

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CABEjM6SH0zKg6ULzv0z_0KYp7wLSoNLT3%3DvY9-MReWTGbupVjg%40mail.gmail.com.

Ken Finnigan

unread,
May 18, 2021, 8:20:36 PM5/18/21
to brand....@gmail.com, Quarkus Development mailing list
Ah, yes. For a JVM build you don't need -Pnative

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages