2022-05-05 08:06:26 +00:00
|
|
|
#ARG DEBIAN_VERSION
|
|
|
|
#FROM debian:${DEBIAN_VERSION}-slim
|
|
|
|
FROM debian:bullseye-slim
|
2022-05-05 08:00:16 +00:00
|
|
|
|
|
|
|
ENV RUSTUP_HOME=/usr/local/rustup \
|
|
|
|
CARGO_HOME=/usr/local/cargo \
|
|
|
|
PATH=/usr/local/cargo/bin:$PATH
|
|
|
|
|
|
|
|
RUN set -eux; \
|
|
|
|
apt-get update; \
|
|
|
|
apt-get install -y --no-install-recommends \
|
|
|
|
ca-certificates \
|
|
|
|
gcc \
|
|
|
|
libc6-dev \
|
|
|
|
wget \
|
|
|
|
; \
|
|
|
|
dpkgArch="$(dpkg --print-architecture)"; \
|
|
|
|
case "${dpkgArch##*-}" in \
|
|
|
|
amd64) rustArch='x86_64-unknown-linux-gnu' ;; \
|
|
|
|
arm64) rustArch='aarch64-unknown-linux-gnu' ;; \
|
|
|
|
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \
|
|
|
|
esac; \
|
|
|
|
\
|
|
|
|
url="https://static.rust-lang.org/rustup/dist/${rustArch}/rustup-init"; \
|
|
|
|
wget "$url"; \
|
|
|
|
chmod +x rustup-init; \
|
|
|
|
./rustup-init -y --no-modify-path --default-toolchain nightly; \
|
|
|
|
rm rustup-init; \
|
|
|
|
chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
|
|
|
|
rustup --version; \
|
|
|
|
cargo --version; \
|
|
|
|
rustc --version; \
|
|
|
|
\
|
|
|
|
apt-get remove -y --auto-remove \
|
|
|
|
wget \
|
|
|
|
; \
|
|
|
|
rm -rf /var/lib/apt/lists/*;
|