Skip to content

Commit a73af35

Browse files
committed
Fix CI regression: Install glibc
Problem: CI build fails on amd64 with "./coursier: not found" (exit code 127). The coursier binary downloads successfully (22.2MB) but cannot execute. Incorrect assumption that x86_64 coursier v2.1.24 is a static musl build. The official coursier binary for x86_64 actually requires glibc, not musl. Previous code only installed glibc for ARM64, causing amd64 builds to fail.
1 parent 75ea208 commit a73af35

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,14 @@ ARG TARGETARCH
5454

5555
RUN mkdir /coursier_cache
5656

57-
# Install glibc for ARM64 coursier binary (x86-64 uses static musl build)
57+
# Install glibc for coursier binaries (both amd64 and arm64 require glibc)
5858
RUN \
59-
apk add --no-cache curl && \
59+
apk add --no-cache curl wget gcompat libstdc++ && \
60+
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
61+
wget -q https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r1/glibc-2.35-r1.apk && \
62+
apk --no-cache --force-overwrite add glibc-2.35-r1.apk && \
63+
rm glibc-2.35-r1.apk && \
6064
if [ "$TARGETARCH" = "arm64" ]; then \
61-
apk add --no-cache wget gcompat libstdc++ && \
62-
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
63-
wget -q https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r1/glibc-2.35-r1.apk && \
64-
apk --no-cache --force-overwrite add glibc-2.35-r1.apk && \
65-
rm glibc-2.35-r1.apk && \
6665
ln -s /lib/ld-musl-aarch64.so.1 /lib/ld-linux-aarch64.so.1 2>/dev/null || true; \
6766
fi
6867

0 commit comments

Comments
 (0)