Update Ubuntu-arm Dockerfile

Update Ubuntu-arm Dockerfile
[ci skip]
This commit is contained in:
Denis S. Soldatov aka General-Beck 2016-06-25 02:58:06 +07:00 committed by GitHub
parent 59d1a82814
commit 4fd0a95112

View File

@ -2,11 +2,11 @@ FROM ubuntu:14.04
WORKDIR /build WORKDIR /build
# install tools and dependencies # install tools and dependencies
RUN apt-get -y update && \ RUN apt-get -y update && \
apt-get install -y --force-yes --no-install-recommends \ apt-get install -y --force-yes --no-install-recommends \
curl git make g++ gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf \ curl git make g++ gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf \
libc6-dev-armhf-cross wget file ca-certificates \ libc6-dev-armhf-cross wget file ca-certificates \
binutils-arm-linux-gnueabihf \ binutils-arm-linux-gnueabihf \
&& \ && \
apt-get clean apt-get clean
# install rustup # install rustup
@ -18,33 +18,30 @@ ENV PATH /root/.cargo/bin:$PATH
ENV RUST_TARGETS="arm-unknown-linux-gnueabihf" ENV RUST_TARGETS="arm-unknown-linux-gnueabihf"
# multirust add arm--linux-gnuabhf toolchain # multirust add arm--linux-gnuabhf toolchain
RUN rustup target add stable arm-unknown-linux-gnueabihf RUN rustup target add armv7-unknown-linux-gnueabihf
# show backtraces # show backtraces
ENV RUST_BACKTRACE 1 ENV RUST_BACKTRACE 1
# set compilers # set compilers
ENV CXX arm-linux-gnueabihf-g++ ENV CXX arm-linux-gnueabihf-g++
ENV CC arm-linux-gnueabihf-gcc ENV CC arm-linux-gnueabihf-gcc
# show tools
RUN rustc -vV && \
cargo -V && \
gcc -v &&\
g++ -v
# build parity # build parity
RUN git clone https://github.com/ethcore/parity && \ RUN git clone https://github.com/ethcore/parity && \
cd parity && \ cd parity && \
git checkout master && \ mkdir -p .cargo && \
wget https://github.com/nix-rust/nix/archive/v0.5.0.tar.gz && \ echo '[target.armv7-unknown-linux-gnueabihf]\n\
tar -xf v0.5.0.tar.gz && \ linker = "arm-linux-gnueabihf-gcc"\n'\
rm -rf v0.5.0.tar.gz && \ >>.cargo/config && \
wget https://github.com/thkaw/mio/archive/v0.5.x.tar.gz && \ cat .cargo/config && \
tar -xf v0.5.x.tar.gz && \ cargo build --target armv7-unknown-linux-gnueabihf --release --verbose && \
rm -rf v0.5.x.tar.gz && \ ls /build/parity/target/armv7-unknown-linux-gnueabihf/release/parity && \
mkdir -p .cargo && \ /usr/bin/arm-linux-gnueabihf-strip /build/parity/target/armv7-unknown-linux-gnueabihf/release/parity
echo 'paths = ["nix-0.5.0","mio-0.5.x"]\n\ RUN file /build/parity/target/armv7-unknown-linux-gnueabihf/release/parity
[target.arm-unknown-linux-gnueabihf]\n\
linker = "arm-linux-gnueabihf-gcc"\n'\
>>.cargo/config && \
cat .cargo/config && \
rustc -vV && \
cargo -V && \
cargo build --target arm-unknown-linux-gnueabihf --release --verbose && \
ls /build/parity/target/arm-unknown-linux-gnueabihf/release/parity && \
file /build/parity/target/arm-unknown-linux-gnueabihf/release/parity && \
/usr/bin/arm-linux-gnueabihf-strip /build/parity/target/arm-unknown-linux-gnueabihf/release/parity
RUN file /build/parity/target/arm-unknown-linux-gnueabihf/release/parity