Created
March 29, 2017 09:07
-
-
Save rsdy/1a3b418f45800afa738b6a0bbe08f7d3 to your computer and use it in GitHub Desktop.
Rust musl builder container
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
FROM ubuntu:16.04 | |
RUN apt-get update && \ | |
apt-get upgrade -y && \ | |
apt-get -y install curl build-essential cmake libssl-dev xutils-dev musl-tools && \ | |
ln -s /usr/bin/g++ /usr/bin/musl-g++ && \ | |
useradd build && \ | |
mkdir -p /home/build && \ | |
chown -R build:build /home/build | |
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y | |
RUN /root/.cargo/bin/rustup target add x86_64-unknown-linux-musl | |
ENV PATH=$PATH:/home/build/.cargo/bin:/root/.cargo/bin | |
WORKDIR /home/build/code | |
CMD cargo build --release --target=x86_64-unknown-linux-musl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment