File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 22# ------------------------------------------------------------------------------------#
33# https://hub.docker.com/r/pkgforge/alpine-rust
44ARG ARCH
5- ARG TOOLCHAIN
65FROM "ghcr.io/pkgforge/devscripts/alpine-slim:${ARCH}"
6+ ARG TOOLCHAIN
7+ ENV R_TOOLCHAIN="${TOOLCHAIN}"
78# ------------------------------------------------------------------------------------#
89# #Setup Rust
910RUN <<EOS
1011 set +e
12+ if [ -z "$R_TOOLCHAIN" ] || [ "$R_TOOLCHAIN" = "" ]; then
13+ exit 1
14+ fi
1115 apk update && apk upgrade --no-cache --no-interactive 2>/dev/null
1216 apk add rustup --latest --upgrade --no-cache --no-interactive 2>/dev/null
1317 hash -r >/dev/null 2>&1
14- rustup-init --default-toolchain "${TOOLCHAIN} " --no-modify-path -y || true
18+ rustup-init --default-toolchain "$R_TOOLCHAIN " --no-modify-path -y || true
1519 if [ -d "/root/.rustup/toolchains" ] && [ "$(du -sm '/root/.rustup/toolchains' | cut -f1)" -gt 10 ]; then
1620 find "/root/.rustup/toolchains" -type d \( -path '*/share/bash' -o -path '*/share/doc' -o -path '*/share/fish' \
1721 -o -path '*/share/man' -o -path '*/share/zsh' \) -exec rm -rvf "{}" + 2>/dev/null || true
You can’t perform that action at this time.
0 commit comments