This repository was archived by the owner on Nov 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1430 from General-Beck/patch-8
Create Dockerfile ubuntu-aarch64
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
FROM ubuntu:14.04 | ||
WORKDIR /build | ||
# install tools and dependencies | ||
RUN apt-get -y update && \ | ||
apt-get install -y --force-yes --no-install-recommends \ | ||
curl git make g++ gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \ | ||
libc6-arm64-cross libc6-dev-arm64-cross wget file ca-certificates \ | ||
binutils-aarch64-linux-gnu \ | ||
&& \ | ||
apt-get clean | ||
|
||
# install rustup | ||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
|
||
# rustup directory | ||
ENV PATH /root/.cargo/bin:$PATH | ||
|
||
ENV RUST_TARGETS="aarch64-unknown-linux-gnu" | ||
|
||
# multirust add arm--linux-gnuabhf toolchain | ||
RUN rustup target add aarch64-unknown-linux-gnu | ||
|
||
# show backtraces | ||
ENV RUST_BACKTRACE 1 | ||
|
||
# set compilers | ||
ENV CXX aarch64-linux-gnu-g++ | ||
ENV CC aarch64-linux-gnu-gcc | ||
|
||
# show tools | ||
RUN rustc -vV && \ | ||
cargo -V && \ | ||
gcc -v &&\ | ||
g++ -v | ||
|
||
# build parity | ||
RUN git clone https://github.com/ethcore/parity && \ | ||
cd parity && \ | ||
mkdir -p .cargo && \ | ||
echo '[target.aarch64-unknown-linux-gnu]\n\ | ||
linker = "aarch64-linux-gnu-gcc"\n'\ | ||
>>.cargo/config && \ | ||
cat .cargo/config && \ | ||
cargo build --target aarch64-unknown-linux-gnu --release --verbose && \ | ||
ls /build/parity/target/aarch64-unknown-linux-gnu/release/parity && \ | ||
/usr/bin/aarch64-linux-gnu-strip /build/parity/target/aarch64-unknown-linux-gnu/release/parity | ||
RUN file /build/parity/target/aarch64-unknown-linux-gnu/release/parity |