forked from rust-lang/docker-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Merge pull request rust-lang#215 from Muscraft/cleanup"
- Loading branch information
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM buildpack-deps:buster | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/rust-lang/docker-rust | ||
|
||
ENV RUSTUP_HOME=/usr/local/rustup \ | ||
CARGO_HOME=/usr/local/cargo \ | ||
PATH=/usr/local/cargo/bin:$PATH \ | ||
RUST_VERSION=nightly | ||
|
||
RUN set -eux; \ | ||
dpkgArch="$(dpkg --print-architecture)"; \ | ||
case "${dpkgArch##*-}" in \ | ||
amd64) rustArch='x86_64-unknown-linux-gnu'; rustupSha256='6aeece6993e902708983b209d04c0d1dbb14ebb405ddb87def578d41f920f56d' ;; \ | ||
armhf) rustArch='armv7-unknown-linux-gnueabihf'; rustupSha256='3c4114923305f1cd3b96ce3454e9e549ad4aa7c07c03aec73d1a785e98388bed' ;; \ | ||
arm64) rustArch='aarch64-unknown-linux-gnu'; rustupSha256='1cffbf51e63e634c746f741de50649bbbcbd9dbe1de363c9ecef64e278dba2b2' ;; \ | ||
i386) rustArch='i686-unknown-linux-gnu'; rustupSha256='0a6bed6e9f21192a51f83977716466895706059afb880500ff1d0e751ada5237' ;; \ | ||
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \ | ||
esac; \ | ||
url="https://static.rust-lang.org/rustup/archive/1.27.1/${rustArch}/rustup-init"; \ | ||
wget "$url"; \ | ||
echo "${rustupSha256} *rustup-init" | sha256sum -c -; \ | ||
chmod +x rustup-init; \ | ||
./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION --default-host ${rustArch}; \ | ||
rm rustup-init; \ | ||
chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \ | ||
rustup --version; \ | ||
cargo --version; \ | ||
rustc --version; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
FROM debian:buster-slim | ||
|
||
LABEL org.opencontainers.image.source=https://github.com/rust-lang/docker-rust | ||
|
||
ENV RUSTUP_HOME=/usr/local/rustup \ | ||
CARGO_HOME=/usr/local/cargo \ | ||
PATH=/usr/local/cargo/bin:$PATH \ | ||
RUST_VERSION=nightly | ||
|
||
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'; rustupSha256='6aeece6993e902708983b209d04c0d1dbb14ebb405ddb87def578d41f920f56d' ;; \ | ||
armhf) rustArch='armv7-unknown-linux-gnueabihf'; rustupSha256='3c4114923305f1cd3b96ce3454e9e549ad4aa7c07c03aec73d1a785e98388bed' ;; \ | ||
arm64) rustArch='aarch64-unknown-linux-gnu'; rustupSha256='1cffbf51e63e634c746f741de50649bbbcbd9dbe1de363c9ecef64e278dba2b2' ;; \ | ||
i386) rustArch='i686-unknown-linux-gnu'; rustupSha256='0a6bed6e9f21192a51f83977716466895706059afb880500ff1d0e751ada5237' ;; \ | ||
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \ | ||
esac; \ | ||
url="https://static.rust-lang.org/rustup/archive/1.27.1/${rustArch}/rustup-init"; \ | ||
wget "$url"; \ | ||
echo "${rustupSha256} *rustup-init" | sha256sum -c -; \ | ||
chmod +x rustup-init; \ | ||
./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION --default-host ${rustArch}; \ | ||
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/*; |