updated arch builder

This commit is contained in:
2025-12-31 19:34:11 +08:00
parent 948ef1361e
commit 7c1725427b
4 changed files with 82 additions and 20 deletions

View File

@@ -81,6 +81,34 @@ WORKDIR /home/luser
FROM base AS rust
RUN mkdir -p /etc/cargo
COPY --chown=1000:1000 config.toml /home/luser/.cargo/config.toml
RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \
rustup \
trunk \
llvm \
clang
FROM rust AS rust-full
RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \
hidapi \
protobuf
USER luser
WORKDIR /home/luser
RUN rustup update
RUN rustup toolchain install stable-x86_64-unknown-linux-gnu --profile minimal
RUN rustup component add rustfmt
RUN rustup target add \
x86_64-unknown-linux-musl \
x86_64-unknown-linux-gnu \
armv7-unknown-linux-musleabihf \
arm-unknown-linux-musleabi \
aarch64-unknown-linux-musl \
aarch64-unknown-linux-gnu \
wasm32-unknown-unknown \
wasm32-wasip2
FROM base AS rust-sccache
RUN mkdir -p /etc/cargo
COPY --chown=1000:1000 config-sccache.toml /home/luser/.cargo/config.toml
COPY --chown=1000:1000 sccache_config.toml /home/luser/.config/sccache/config
RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \
rustup \
@@ -89,7 +117,7 @@ RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \
llvm \
clang
FROM rust AS rust-full
FROM rust-sccache AS rust-full-sccache
RUN --mount=type=cache,target=/var/cache/pacman pacman -S --noconfirm --needed \
hidapi \
protobuf