0

I am trying to build a Docker image in my Mac M1....

When I try to run my Image I am getting "exec format error" which as I understand a cross platform native image problem but as far as I can see I build the native-image with an arm64 GraalVM.

[1/7] Initializing...                                                                                    
(6,5s @ 0,23GB)
Version info: 'GraalVM 22.3.0 Java 17 CE'
Java version info: '17.0.5+8-jvmci-22.3-b08'
C compiler: cc (apple, arm64, 14.0.0)
Garbage collector: Serial GC
1 user-specific feature(s)

And I used a base image from alpine:arm64

https://hub.docker.com/layers/library/alpine/3.17.0/images/sha256-af06af3514c44a964d3b905b498cf6493db8f1cde7c10e078213a89c87308ba0?context=explore

and

uname -a

confirms that is an arm64 based linux.

Linux 5e6ec3a5a46e 5.15.64-0-virt #1-Alpine SMP Mon, 05 Sep 2022 08:02:49 +0000 aarch64 Linux

and

docker image inspect

reports

"Architecture": "arm64",
"Os": "linux",
"Size": 80206330,
"VirtualSize": 80206330,

it is an arm64/linux is.

What is going on here?

posthumecaver
  • 1,584
  • 4
  • 16
  • 29

1 Answers1

0

@peterz answer is absolutely correct, my assumption that MacOS is Unix/Linux based was false.

When I did a cross platform native-image Generation for alpine, this error disappeared.

posthumecaver
  • 1,584
  • 4
  • 16
  • 29