docker-rusty-moon/Dockerfile

37 lines
1.1 KiB
Docker
Raw Normal View History

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; \
2022-05-05 08:18:52 +00:00
./rustup-init -y --no-modify-path --default-toolchain nightly --target x86_64-pc-windows-gnu; \
2022-05-05 08:00:16 +00:00
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/*;