2016-06-24 22:51:05 +02:00
|
|
|
FROM ubuntu:14.04
|
|
|
|
WORKDIR /build
|
2017-05-23 12:25:41 +02:00
|
|
|
|
2016-06-24 22:51:05 +02:00
|
|
|
# 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 \
|
2018-08-30 20:03:38 +02:00
|
|
|
binutils-aarch64-linux-gnu cmake3 libudev-dev \
|
2016-06-24 22:51:05 +02:00
|
|
|
&& \
|
|
|
|
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
|
|
|
|
|
|
|
|
# show tools
|
2017-05-23 12:25:41 +02:00
|
|
|
RUN rustc -vV && cargo -V
|
2016-06-24 22:51:05 +02:00
|
|
|
|
|
|
|
# build parity
|
2017-05-23 12:25:41 +02:00
|
|
|
ADD . /build/parity
|
|
|
|
RUN cd parity && \
|
2016-06-24 22:51:05 +02:00
|
|
|
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
|
2016-08-12 09:18:42 +02:00
|
|
|
|
2016-06-24 22:51:05 +02:00
|
|
|
RUN file /build/parity/target/aarch64-unknown-linux-gnu/release/parity
|
2016-08-12 09:18:42 +02:00
|
|
|
|
|
|
|
EXPOSE 8080 8545 8180
|
|
|
|
ENTRYPOINT ["/build/parity/target/aarch64-unknown-linux-gnu/release/parity"]
|