2022-05-05 08:06:26 +00:00
|
|
|
#ARG DEBIAN_VERSION
|
|
|
|
#FROM debian:${DEBIAN_VERSION}-slim
|
2022-05-05 08:13:38 +00:00
|
|
|
FROM ubuntu:jammy
|
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; \
|
2022-05-05 08:13:38 +00:00
|
|
|
apt update; \
|
|
|
|
apt install -y --no-install-recommends \
|
2022-05-05 08:00:16 +00:00
|
|
|
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; \
|
|
|
|
\
|
2022-05-05 08:13:38 +00:00
|
|
|
apt remove -y --auto-remove \
|
2022-05-05 08:00:16 +00:00
|
|
|
wget \
|
|
|
|
; \
|
|
|
|
rm -rf /var/lib/apt/lists/*;
|