fix(docker): add gmp-static for the static link step
Build image / build (push) Successful in 1m6s

Alpine 3.22 split the libgmp static archive out of gmp-dev into a
separate gmp-static subpackage. Without it, 'crystal build --static'
fails with 'ld: cannot find -lgmp ... have you installed the static
version of the gmp library'. Verified by inspecting the contents of
gmp-dev on crystallang/crystal:1.20.2-alpine (only .so present, no
.a).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Alexandru Macocian
2026-05-22 15:58:10 +02:00
parent 174ee1171b
commit 712f4dcca8
+1 -1
View File
@@ -22,7 +22,7 @@ RUN cd openssl-${OPENSSL_VERSION} && ./Configure --openssldir=/etc/ssl && make -
FROM dependabot-crystal AS builder
RUN apk add --no-cache sqlite-static yaml-static gmp-dev
RUN apk add --no-cache sqlite-static yaml-static gmp-dev gmp-static
RUN apk del openssl-dev openssl-libs-static
ARG release