Skip to content

Commit a08a657

Browse files
committed
Use gcompat to ensure mc-image-helper runs on aarch64+alpine
1 parent 17d7f01 commit a08a657

4 files changed

Lines changed: 8 additions & 15 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ jobs:
4545
baseImage: eclipse-temurin:25-jre-noble
4646
platforms: linux/amd64,linux/arm64,linux/riscv64
4747
mcVersion: latest
48+
# forked build that include riscv64
49+
knockdRepoOrg: Opvolger/knock
4850
- variant: java25-alpine
4951
baseImage: eclipse-temurin:25-jre-alpine
5052
platforms: linux/amd64,linux/arm64
5153
mcVersion: latest
52-
# For GLIBC_2.34 support (and Alpine)
53-
knockdRepoOrg: Metalcape/knock
5454
- variant: java25-jdk
5555
baseImage: eclipse-temurin:25
5656
platforms: linux/amd64,linux/arm64
@@ -68,49 +68,37 @@ jobs:
6868
baseImage: eclipse-temurin:21-jre-alpine
6969
platforms: linux/amd64,linux/arm64
7070
mcVersion: 1.21.11
71-
# For GLIBC_2.34 support (and Alpine)
72-
knockdRepoOrg: Metalcape/knock
7371
# JAVA 17:
7472
- variant: java17
7573
# jammy doesn't work until minecraft updates to https://github.com/netty/netty/issues/12343
7674
baseImage: eclipse-temurin:17-jre-focal
7775
platforms: linux/amd64,linux/arm/v7,linux/arm64
7876
mcVersion: 1.20.4
79-
# For GLIBC_2.34 support (and Alpine)
80-
knockdRepoOrg: Metalcape/knock
8177
# JAVA 16
8278
- variant: java16
8379
baseImage: adoptopenjdk:16-jre-hotspot
8480
platforms: linux/amd64,linux/arm/v7,linux/arm64
8581
mcVersion: 1.16.5
86-
# For GLIBC_2.34 support
87-
knockdRepoOrg: Metalcape/knock
8882
# Pin version for pre-Java 17
8983
mcHelperVersion: 1.51.3-java8
9084
# JAVA 11
9185
- variant: java11
9286
baseImage: adoptopenjdk:11-jre-hotspot
9387
platforms: linux/amd64,linux/arm/v7,linux/arm64
9488
mcVersion: 1.16.4
95-
# For GLIBC_2.34 support
96-
knockdRepoOrg: Metalcape/knock
9789
# Pin version for pre-Java 17
9890
mcHelperVersion: 1.51.3-java8
9991
# JAVA 8: NOTE: Unable to go past 8u312 because of Forge dependencies
10092
- variant: java8
10193
baseImage: eclipse-temurin:8u312-b07-jre-focal
10294
platforms: linux/amd64,linux/arm/v7,linux/arm64
10395
mcVersion: 1.12.2
104-
# For GLIBC_2.34 support
105-
knockdRepoOrg: Metalcape/knock
10696
# Pin version for Java 8, also be sure to set in verify-pr.yml
10797
mcHelperVersion: 1.51.3-java8
10898
- variant: java8-jdk
10999
baseImage: eclipse-temurin:8u312-b07-jdk-focal
110100
platforms: linux/amd64,linux/arm64
111101
mcVersion: 1.12.2
112-
# For GLIBC_2.34 support
113-
knockdRepoOrg: Metalcape/knock
114102
# Pin version for Java 8, also be sure to set in verify-pr.yml
115103
mcHelperVersion: 1.51.3-java8
116104
env:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ARG EXTRA_DNF_PACKAGES=""
1313
ARG EXTRA_ALPINE_PACKAGES=""
1414
ARG FORCE_INSTALL_PACKAGES=1
1515
ARG KNOCKD_VERSION=0.8.1
16-
ARG KNOCKD_REPO_ORG=Opvolger/knock
16+
ARG KNOCKD_REPO_ORG=Metalcape/knock
1717
RUN --mount=target=/build,source=build \
1818
TARGET=${TARGETARCH}${TARGETVARIANT} \
1919
/build/run.sh install-packages

build/alpine/install-packages.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ apk add --no-cache -U \
3535
libcap \
3636
numactl \
3737
jattach \
38+
gcompat \
3839
${EXTRA_ALPINE_PACKAGES}
3940

4041
# Download and install patched knockd

scripts/start-configuration

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ if (( $(mc-image-helper java-release) >= 17 )); then
3333
export MC_IMAGE_HELPER_OPTS
3434
fi
3535

36+
if [[ $(getDistro) == alpine ]]; then
37+
export LD_PRELOAD=/lib/libgcompat.so.0
38+
fi
39+
3640
export HOME=/data
3741

3842
log "Running as uid=$(id -u) gid=$(id -g) with /data as '$(ls -lnd /data)'"

0 commit comments

Comments
 (0)