chore(docker): ensure resilient multi-arch detection and explicit ziglang dependency
This commit is contained in:
1 parent
b4cef85b1f
commit
a9ff92e1d1
2 files changed
+6
-6
No files matched your search
+5
-5
@@ -18,11 +18,11 @@ ARG TARGETARCH
|
||||
# zig (via the cargo-zigbuild wheel) is the cross C toolchain for musl targets.
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends python3-pip \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& pip install --no-cache-dir --break-system-packages cargo-zigbuild
|
||||
RUN case "$TARGETARCH" in \
|
||||
amd64) echo x86_64-unknown-linux-musl ;; \
|
||||
arm64) echo aarch64-unknown-linux-musl ;; \
|
||||
*) echo "unsupported arch $TARGETARCH" >&2; exit 1 ;; \
|
||||
&& pip install --no-cache-dir --break-system-packages cargo-zigbuild ziglang
|
||||
RUN case "${TARGETARCH:-$(uname -m)}" in \
|
||||
amd64|x86_64) echo x86_64-unknown-linux-musl ;; \
|
||||
arm64|aarch64) echo aarch64-unknown-linux-musl ;; \
|
||||
*) echo "unsupported arch ${TARGETARCH:-$(uname -m)}" >&2; exit 1 ;; \
|
||||
esac > /rust-target \
|
||||
&& rustup target add "$(cat /rust-target)"
|
||||
WORKDIR /src
|
||||
|
||||
Reference in new issue
Block a user