Skip to content

Instantly share code, notes, and snippets.

@leepa leepa/Dockerfile
Created Dec 5, 2018

Embed
What would you like to do?
#!/bin/sh
docker run --rm \
--user "$(id -u)":"$(id -g)" \
-v "$PWD":/usr/src/myapp \
-w /usr/src/myapp \
$DOCKER_TAG \
cargo build --release
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
You can’t perform that action at this time.