mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-27 23:50:36 +08:00
Update build Dockerfile
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Builds release binaries for Radicle.
|
||||
FROM rust:1.77.2-alpine3.19 as builder
|
||||
FROM rust:1.83.0-alpine3.21 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 && \
|
||||
@@ -27,15 +27,8 @@ RUN rustup target add \
|
||||
|
||||
# Install dependencies for cross-compiling to macOS.
|
||||
# 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 --locked
|
||||
RUN cargo install cargo-zigbuild@0.19.3 --locked
|
||||
|
||||
|
||||
# Parts of the macOS SDK are required to build Radicle, we make these available
|
||||
@@ -54,7 +47,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.21 as packager
|
||||
|
||||
ARG RADICLE_VERSION
|
||||
ARG SOURCE_DATE_EPOCH
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.77
|
||||
1.83
|
||||
Reference in New Issue
Block a user