2016-06-21 21:05:10 +02:00
|
|
|
FROM centos:latest
|
|
|
|
WORKDIR /build
|
2017-05-23 12:25:41 +02:00
|
|
|
|
2016-06-21 21:05:10 +02:00
|
|
|
# install tools and dependencies
|
|
|
|
RUN yum -y update&& \
|
2016-06-24 19:59:03 +02:00
|
|
|
yum install -y git make gcc-c++ gcc file binutils
|
2017-05-23 12:25:41 +02:00
|
|
|
|
2016-06-21 21:05:10 +02:00
|
|
|
# install rustup
|
|
|
|
RUN curl -sSf https://static.rust-lang.org/rustup.sh -o rustup.sh &&\
|
2016-08-12 09:18:42 +02:00
|
|
|
ls&&\
|
2017-04-28 00:17:20 +02:00
|
|
|
sh rustup.sh --disable-sudo
|
2017-05-23 12:25:41 +02:00
|
|
|
|
2016-06-21 21:05:10 +02:00
|
|
|
# show backtraces
|
|
|
|
ENV RUST_BACKTRACE 1
|
2017-05-23 12:25:41 +02:00
|
|
|
|
2016-06-24 19:59:03 +02:00
|
|
|
# set compiler
|
2016-06-21 21:05:10 +02:00
|
|
|
ENV CXX g++
|
|
|
|
ENV CC gcc
|
2017-05-23 12:25:41 +02:00
|
|
|
|
2016-06-24 19:59:03 +02:00
|
|
|
# show tools
|
2016-06-21 21:05:10 +02:00
|
|
|
RUN rustc -vV && \
|
|
|
|
cargo -V && \
|
|
|
|
gcc -v &&\
|
|
|
|
g++ -v
|
2017-05-23 12:25:41 +02:00
|
|
|
|
2016-06-24 19:59:03 +02:00
|
|
|
# build parity
|
2017-05-23 12:25:41 +02:00
|
|
|
ADD . /build/parity
|
|
|
|
RUN cd parity&&\
|
|
|
|
cargo build --release --verbose && \
|
2016-06-21 21:05:10 +02:00
|
|
|
ls /build/parity/target/release/parity && \
|
2016-06-24 19:59:03 +02:00
|
|
|
strip /build/parity/target/release/parity
|
2016-08-12 09:18:42 +02:00
|
|
|
|
2016-06-21 21:05:10 +02:00
|
|
|
RUN file /build/parity/target/release/parity
|
2016-08-12 09:18:42 +02:00
|
|
|
|
|
|
|
EXPOSE 8080 8545 8180
|
|
|
|
ENTRYPOINT ["/build/parity/target/release/parity"]
|