Skip to content

Instantly share code, notes, and snippets.

@leepa
Created December 5, 2018 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leepa/83ee1a5534f70f850f1fe45c8c701807 to your computer and use it in GitHub Desktop.
Save leepa/83ee1a5534f70f850f1fe45c8c701807 to your computer and use it in GitHub Desktop.
#!/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