Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
build: update zig installation method
Merged yorgos-laptop opened 1 year ago

This simplifies the Dockerfile a little , as the zig package (0.12.0) is available on alpine 3.20 https://repology.org/project/zig/versions

parent image is also updated to current rust-toolchain

Signed-off-by: Yorgos Saslis yorgos.work@proton.me

1 file changed +4 -10 87f6956e 87cb7bf5
modified build/Dockerfile
@@ -1,5 +1,5 @@
# Builds release binaries for Radicle.
-
FROM rust:1.77.2-alpine3.19 as builder
+
FROM rust:1.80-alpine3.20 as builder
LABEL maintainer="Radicle Team <team@radicle.xyz>"
WORKDIR /src
COPY . .
@@ -13,7 +13,7 @@ ARG GIT_HEAD
# Copy cargo configuration we're going to use to specify compiler options.
RUN mkdir -p .cargo && cp build/config.toml .cargo/config.toml
# Install dependencies.
-
RUN apk update && apk add --no-cache git musl-dev minisign curl xz asciidoctor
+
RUN apk update && apk add --no-cache git musl-dev xz asciidoctor zig
# Build man pages and strip metadata. Removes all comments, since they include
# non-reproducible information, such as version numbers.
RUN asciidoctor --doctype manpage --backend manpage --destination-dir . *.1.adoc && \
@@ -29,13 +29,7 @@ RUN rustup target add \
# We use Zig as the linker to perform the compilation from a Linux host.
# Zig is not yet available on Debian, so we download the official binary.
# Compilation is done via `cargo-zigbuild` which is a wrapper around `zig`.
-
RUN curl -sSf -o zig.tar.xz         https://ziglang.org/download/0.12.0/zig-linux-x86_64-0.12.0.tar.xz && \
-
    curl -sSf -o zig.tar.xz.minisig https://ziglang.org/download/0.12.0/zig-linux-x86_64-0.12.0.tar.xz.minisig && \
-
    minisign -Vm zig.tar.xz -P RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U && \
-
    xz -d -c zig.tar.xz | tar -x && \
-
    mv zig-linux-x86_64-0.12.0/zig /usr/bin/zig && \
-
    mv zig-linux-x86_64-0.12.0/lib /usr/lib/zig && \
-
    cargo install cargo-zigbuild@0.18.3
+
RUN cargo install cargo-zigbuild@0.19.3


# Parts of the macOS SDK are required to build Radicle, we make these available
@@ -56,7 +50,7 @@ RUN cargo zigbuild --locked --release \

# Now copy the files to a new image without all the intermediary artifacts to
# save some space.
-
FROM alpine:3.19 as packager
+
FROM alpine:3.20 as packager

ARG RADICLE_VERSION
ARG SOURCE_DATE_EPOCH