This is an automated email from the ASF dual-hosted git repository.
hangc0276 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new 0af6e6071a Add cargo-zigbuild for release dockerfile (#4805)
0af6e6071a is described below
commit 0af6e6071ab46acc7af7adb01a112567ccd1aa05
Author: Hang Chen <[email protected]>
AuthorDate: Mon Jun 1 14:11:11 2026 -0700
Add cargo-zigbuild for release dockerfile (#4805)
* Add cargo-zigbuild for release dockerfile
* address comments
---
dev/release/Dockerfile | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/dev/release/Dockerfile b/dev/release/Dockerfile
index 81745e0bac..6d7c2ba8e9 100644
--- a/dev/release/Dockerfile
+++ b/dev/release/Dockerfile
@@ -21,5 +21,24 @@ FROM --platform=linux/amd64 maven:3.9.11-eclipse-temurin-17
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get dist-upgrade -y && \
- apt-get install -y g++ cmake gnupg2 vim subversion less zip unzip
+ apt-get install -y g++ cmake gnupg2 vim subversion less zip unzip xz-utils
+
+# Rust toolchain (for native-io module's cargo-zigbuild build)
+ENV RUSTUP_HOME=/usr/local/rustup \
+ CARGO_HOME=/usr/local/cargo \
+ PATH=/usr/local/cargo/bin:$PATH
+RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
+ sh -s -- -y --default-toolchain stable --profile minimal --no-modify-path
&& \
+ rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu && \
+ chmod -R a+rwX /usr/local/rustup /usr/local/cargo
+
+# Zig (used by cargo-zigbuild for cross-compilation)
+ARG ZIG_VERSION=0.13.0
+RUN curl -sL
https://ziglang.org/download/${ZIG_VERSION}/zig-linux-x86_64-${ZIG_VERSION}.tar.xz
| \
+ tar -xJ -C /opt && \
+ ln -s /opt/zig-linux-x86_64-${ZIG_VERSION}/zig /usr/local/bin/zig
+
+# cargo-zigbuild
+RUN cargo install cargo-zigbuild --locked && \
+ chmod -R a+rwX /usr/local/cargo