Created
December 5, 2018 11:50
-
-
Save leepa/83ee1a5534f70f850f1fe45c8c701807 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/sh | |
docker run --rm \ | |
--user "$(id -u)":"$(id -g)" \ | |
-v "$PWD":/usr/src/myapp \ | |
-w /usr/src/myapp \ | |
$DOCKER_TAG \ | |
cargo build --release |
This file contains hidden or 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
FROM amazonlinux:1 | |
ENV RUSTUP_HOME=/usr/local/rustup \ | |
CARGO_HOME=/usr/local/cargo \ | |
PATH=/usr/local/cargo/bin:$PATH \ | |
RUST_VERSION=1.30.1 | |
RUN set -eux; \ | |
yum update -y ;\ | |
yum install -y wget ;\ | |
yum groupinstall -y 'Development Tools'; \ | |
rustArch='x86_64-unknown-linux-gnu'; rustupSha256='0077ff9c19f722e2be202698c037413099e1188c0c233c12a2297bf18e9ff6e7'; \ | |
url="https://static.rust-lang.org/rustup/archive/1.14.0/${rustArch}/rustup-init"; \ | |
wget "$url"; \ | |
echo "${rustupSha256} *rustup-init" | sha256sum -c -; \ | |
chmod +x rustup-init; \ | |
./rustup-init -y --no-modify-path --default-toolchain $RUST_VERSION; \ | |
rm rustup-init; \ | |
chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \ | |
rustup --version; \ | |
cargo --version; \ | |
rustc --version; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment