Quarkus deploy error - exec ./application: exec format error

58 views Asked by At

I have two VPS, one running on Ubuntu 22.04.3 LTS (GNU/Linux 5.15.0-1040-oracle aarch64) and the other one running on Ubuntu 22.04.3 LTS (GNU/Linux 5.15.0-1047-kvm x86_64). I am trying to native build my Quarkus native app on the aarch64 server (which is bigger than the other one) and send the built package to the other server to run it there using Docker.

I correctly setted up the native build (done in Jenkins, as shown below) and the built package is correctly being sent to the other server (i also used the same mechanism to deploy in the same way 2 Angular app and they are working fine).

But, when i try to run the Quarkus native app on Docker it gives me this error: exec ./application: exec format error

Does anyone know if what i am doing (building on aarch64 and deploying to x64) is correct and can be done? Is there any other way? (i am trying to not make the build on the second server)

Some other info:

  • Jenkins Configuration for the native build: enter image description here

  • My Dockerfile (pretty much the basic one):

    FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8
    WORKDIR /work/
    RUN chown 1001 /work \
        && chmod "g+rwX" /work \
        && chown 1001:root /work
    
    COPY --chown=1001:root ./*-runner /work/application
    
    COPY --chown=1001:root ./*.so /work/
    
    EXPOSE 9090
    USER 1001
    
    ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"]
0

There are 0 answers