Add 'Dockerfile'
This commit is contained in:
parent
22eb0b136e
commit
e3c78cc920
36
Dockerfile
Normal file
36
Dockerfile
Normal file
|
@ -0,0 +1,36 @@
|
|||
ARG DEBIAN_VERSION
|
||||
FROM debian:${DEBIAN_VERSION}-slim
|
||||
|
||||
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/*;
|
Loading…
Reference in a new issue