graalvm / native-build-tools

Native-image plugins for various build tools
https://graalvm.github.io/native-build-tools/
Other
349 stars 51 forks source link

Able to build the spring boot app to executable in docker image, but unable to run. #519

Closed KaeYan93 closed 9 months ago

KaeYan93 commented 9 months ago

Error:

./starter: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by ./starter)

Base image: ghcr.io/graalvm/graalvm-ce:22.3.1

I am using spring native. In the pom.xml, this is my plugin config:

<plugin>
  <groupId>org.graalvm.buildtools</groupId>
  <artifactId>native-maven-plugin</artifactId>
</plugin>

The command i use to build it is mvnw native:compile -Pnative.

Is it because the difference in linux OS? In the docker image, the OS is Oracle Linux 9.1, but I am running the executable in the Redhat system.

If so, how can i make sure that the executable able to run in other Linux OS? I want it to be able to run on:

  1. Ubuntu Linux 22.04 LTS
  2. Red Hat Enterprise Linux 8.2