Last active
December 5, 2018 15:22
-
-
Save drizzt/fa4d62fc1118b387078bc06bd6c69009 to your computer and use it in GitHub Desktop.
Dockerfile to build grin for Windows
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
# Usage: | |
# git clone --recurse --branch windows https://github.com/drizzt/grin.git | |
# cd grin | |
# wget -O Dockerfile https://gist.githubusercontent.com/drizzt/fa4d62fc1118b387078bc06bd6c69009/raw/Dockerfile | |
# docker build -t grin-mingw . | |
# docker run -ti --rm --user $(id -u) -v $PWD:/usr/src/grin grin-mingw | |
# ls target/x86_64-pc-windows-gnu/debug/grin.exe | |
FROM rust:latest | |
RUN set -ex && \ | |
apt-get update && \ | |
DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retires=10 --no-install-recommends --yes install \ | |
clang \ | |
libclang-dev \ | |
llvm-dev \ | |
libncurses5 \ | |
libncursesw5 \ | |
cmake \ | |
git \ | |
mingw-w64 && \ | |
apt-get clean && \ | |
rm -rf /var/lib/apt/lists/* | |
WORKDIR /usr/src/grin | |
ENV RUSTFLAGS="-C linker=x86_64-w64-mingw32-gcc -C ar=x86_64-w64-mingw32-ar" | |
ENV CARGO_HOME="/usr/src/grin/target/x86_64-pc-windows-gnu/.cargo" | |
# Installing Windows target | |
RUN rustup target add x86_64-pc-windows-gnu | |
# Building Grin | |
ENTRYPOINT ["cargo", "build", "--target", "x86_64-pc-windows-gnu"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment