1

This is a follow up question on Building quarkus native Linux/amd64 (x86_64) image from Apple M1 (Arm) with which I am still struggling.

I have the exact same issue (although using maven). I am trying to build a linux/amd64 native image on an Apple M1 using Maven. Has anyone been able to do this?

I've tried various different configurations, but the resulting runner/docker image always seems to be build for the arm64 (aarch64) architecture or gets stuck (see 16225)

Here's (one of) my maven build commands, based on https://quarkus.io/guides/building-native-image

mvn clean package -Pnative -e \
-Dmaven.test.skip=true \
-Dquarkus.native.container-build=true \
-Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17 \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.push=true

Replacing -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17 with -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3.1.0-Final-java17-amd64 causes the build to get stuck.

and here the content of my Dockerfile.native (not sure if it's relevant):

FROM registry.access.redhat.com/ubi8/ubi-minimal:8.7
WORKDIR /work/
COPY target/*-runner /work/application
RUN chmod 775 /work
EXPOSE 8080
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]

The output of the -runner quarkus executable remains to be

ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0

and when running uname -m on the terminal (Docker) it states aarch64.

What am I missing? Any help would be much appreciated.

eistropfen
  • 35
  • 6

0 Answers0