quarkus: Unable to run native image built using maven + jib on arm64 using new base image

Describe the bug

I was able to successfully build a native image for arm64 using the new base image. I have these 2 properties set in my application.properties file

quarkus.jib.platforms=linux/arm64
quarkus.jib.base-native-image=quay.io/quarkus/quarkus-micro-image:2.0

and I build /deploy it with this command mvn package $MAVEN_CLI_OPTS -Pnative -DskipTests -Dquarkus.container-image.image=$AWS_ECR:latest -Dquarkus.container-image.push=true -Dquarkus.container-image.username=AWS -Dquarkus.container-image.password=$(cat password.txt)

I have the following dependency

  <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-container-image-jib</artifactId>
    </dependency>

Everything seems to build properly but when I try to run the image that gets built on an arm64 machine i get the classic standard_init_linux.go:228: exec user process caused: exec format error

Is there anything wrong with the way I built this?

Expected behavior

I expected the app to start successfully running on an arm64 device

Actual behavior

application does not start

How to Reproduce?

I provided the steps above, the application is a boilerplate generated from the quarkus cli without any additional functionality

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

@thedewpoint Yes. We are working on a GH Action workflow to do that (we already have something, but it’s pretty complex). Look at the quarkus superheroes workflows (and fasten your seat belt): https://github.com/quarkusio/quarkus-super-heroes/blob/main/.github/workflows/build-push-container-images.yml

I haven’t used JIB, but I can confirm that doing a build in a container (-Dquarkus.native.container-build=true) gives the same error when running it: exec format error: target/code-with-quarkus-1.0.0-SNAPSHOT-runner