fix(ci): build static native binary (musl) to fix glibc version mismatch
CI / Build Native (push) Failing after 14m45s
CI / Build Native (push) Failing after 14m45s
Container `maven:3.9.6-eclipse-temurin-21` is Ubuntu 22.04 jammy with glibc 2.35. Container `quarkus-micro-image:2.0` is UBI 9 minimal with glibc 2.34. Native-image links against the build host's glibc, so the resulting binary needs GLIBC_2.34+ symbols that the UBI 9 runtime doesn't provide: ./application: /lib64/libc.so.6: version `GLIBC_2.34' not found ./application: /lib64/libc.so.6: version `GLIBC_2.33' not found ./application: /lib64/libc.so.6: version `GLIBC_2.32' not found Set quarkus.native.binary-type=STATIC so GraalVM embeds musl into the binary and removes the glibc dependency. The static binary runs on any Linux distribution, including UBI minimal. Trade-off: ~50MB -> ~80MB image size.
This commit is contained in:
@@ -60,7 +60,7 @@ jobs:
|
||||
restore-keys: ${{ runner.os }}-node-
|
||||
|
||||
- name: Build (Native)
|
||||
run: mvn package -Pnative -B -DskipTests -Dquarkus.native.native-image-xmx=4g
|
||||
run: mvn package -Pnative -B -DskipTests -Dquarkus.native.native-image-xmx=4g -Dquarkus.native.binary-type=STATIC
|
||||
|
||||
- name: Verify native binary
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user