Skip to content

Commit

Permalink
Add build dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapk00 committed Jun 13, 2019
1 parent 6cc5b87 commit b07b464
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM rust:1.34
LABEL Description="Rust compile env for linux + windows (cross)"

RUN apt update
RUN apt install -y build-essential mingw-w64

RUN rustup target add x86_64-pc-windows-gnu
RUN rustup target add x86_64-unknown-linux-musl

# Append the linker to the cargo config for windows cross compile
RUN echo "[target.x86_64-pc-windows-gnu]" >> /usr/local/cargo/config && \
echo "linker = '/usr/bin/x86_64-w64-mingw32-gcc'" >> /usr/local/cargo/config

ENV CC_x86_64_unknown_linux_musl="gcc"

0 comments on commit b07b464

Please sign in to comment.