build/zig: 0.16.0 → 0.17.0

This reverts commit a87e0bd1c8, which
changed from downloading Zig to installing it via `apk`.

The reason to do this back then was because the download failed after
the version bump in 8d50b75826.
However, the reason for the download to fail was that the file name
pattern for the tarballs changed, see
<https://ziggit.dev/t/zig-0-14-1-released/10233/2> and that no
indirection via <https://ziglang.org/download/index.json> was done.

Now, as 0.17.0 is released, and the package in the Alpine repositories
is taking time to be updated, we revert the change, and rewrite the
download step to be more resilient.
This commit is contained in:
Lorenz Leutgeb
2026-10-13 23:56:45 +02:00
parent 3032ba1298
commit 9ce88eda3f
+13 -2
View File
@@ -19,10 +19,21 @@ RUN mkdir -p .cargo && cp build/config.toml .cargo/config.toml
# Install dependencies.
RUN apk update && apk add --no-cache \
asciidoctor \
curl \
git \
jq \
musl-dev \
xz \
zig=0.16.0-r1
xz
# Install a version of Zig that supports macOS TBD v4
ARG ZIG_VERSION="0.17.0"
RUN mkdir -p /usr/local/zig && \
ZIG_URL=$(\
curl -fsSL https://ziglang.org/download/index.json | \
jq -er --arg version "$ZIG_VERSION" '.[$version]["x86_64-linux"].tarball' \
) && \
curl -fsSL "$ZIG_URL" | tar -xJ -C /usr/local/zig --strip-components=1 && \
ln -s /usr/local/zig/zig /usr/local/bin/zig
# Build man pages and strip metadata. Removes all comments, since they include
# non-reproducible information, such as version numbers.