2017-01-25 19:25:52 +01:00
|
|
|
FROM ubuntu:14.04
|
2017-02-17 16:03:40 +01:00
|
|
|
MAINTAINER Parity Technologies <devops@parity.io>
|
2017-01-25 19:25:52 +01:00
|
|
|
WORKDIR /build
|
|
|
|
# install tools and dependencies
|
|
|
|
RUN apt-get update && \
|
2017-02-04 23:39:22 +01:00
|
|
|
apt-get install -y --force-yes --no-install-recommends \
|
2017-01-25 19:25:52 +01:00
|
|
|
# make
|
|
|
|
build-essential \
|
|
|
|
# add-apt-repository
|
|
|
|
software-properties-common \
|
|
|
|
make \
|
|
|
|
curl \
|
|
|
|
wget \
|
|
|
|
git \
|
|
|
|
g++ \
|
|
|
|
gcc \
|
|
|
|
libc6 \
|
|
|
|
libc6-dev \
|
|
|
|
binutils \
|
|
|
|
file \
|
|
|
|
openssl \
|
|
|
|
libssl-dev \
|
2017-02-07 22:15:01 +01:00
|
|
|
libudev-dev \
|
2017-01-25 19:25:52 +01:00
|
|
|
pkg-config \
|
|
|
|
dpkg-dev \
|
|
|
|
# evmjit dependencies
|
|
|
|
zlib1g-dev \
|
2017-02-11 17:48:45 +01:00
|
|
|
libedit-dev \
|
2017-02-17 16:03:40 +01:00
|
|
|
libudev-dev &&\
|
|
|
|
# cmake and llvm ppa's. then update ppa's
|
|
|
|
add-apt-repository -y "ppa:george-edison55/cmake-3.x" && \
|
2017-01-25 19:25:52 +01:00
|
|
|
add-apt-repository "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.7 main" && \
|
|
|
|
apt-get update && \
|
2017-02-17 16:03:40 +01:00
|
|
|
apt-get install -y --force-yes cmake llvm-3.7-dev && \
|
2017-01-25 19:25:52 +01:00
|
|
|
# install evmjit
|
2017-02-17 16:03:40 +01:00
|
|
|
git clone https://github.com/debris/evmjit && \
|
2017-01-25 19:25:52 +01:00
|
|
|
cd evmjit && \
|
|
|
|
mkdir build && cd build && \
|
2017-02-17 16:03:40 +01:00
|
|
|
cmake .. && make && make install && cd && \
|
2017-01-25 19:25:52 +01:00
|
|
|
# install rustup
|
2017-02-17 16:03:40 +01:00
|
|
|
curl https://sh.rustup.rs -sSf | sh -s -- -y && \
|
2017-01-25 19:25:52 +01:00
|
|
|
# rustup directory
|
2017-02-17 16:03:40 +01:00
|
|
|
PATH=/root/.cargo/bin:$PATH && \
|
2017-01-25 19:25:52 +01:00
|
|
|
# show backtraces
|
2017-02-17 16:03:40 +01:00
|
|
|
RUST_BACKTRACE=1 && \
|
2017-01-25 19:25:52 +01:00
|
|
|
# build parity
|
2017-02-17 16:03:40 +01:00
|
|
|
cd /build&&git clone https://github.com/ethcore/parity && \
|
2017-01-25 19:25:52 +01:00
|
|
|
cd parity && \
|
2017-02-17 16:03:40 +01:00
|
|
|
git pull&& \
|
|
|
|
git checkout $CI_BUILD_REF_NAME && \
|
|
|
|
cargo build --verbose --release --features final && \
|
|
|
|
#ls /build/parity/target/release/parity && \
|
|
|
|
strip /build/parity/target/release/parity && \
|
|
|
|
file /build/parity/target/release/parity&&mkdir -p /parity&& cp /build/parity/target/release/parity /parity&&\
|
2017-02-15 18:40:23 +01:00
|
|
|
#cleanup Docker image
|
2017-02-17 16:03:40 +01:00
|
|
|
rm -rf /root/.cargo&&rm -rf /root/.multirust&&rm -rf /root/.rustup&&rm -rf /build&&\
|
|
|
|
apt-get purge -y \
|
|
|
|
# make
|
|
|
|
build-essential \
|
|
|
|
# add-apt-repository
|
|
|
|
software-properties-common \
|
|
|
|
make \
|
|
|
|
curl \
|
|
|
|
wget \
|
|
|
|
git \
|
|
|
|
g++ \
|
|
|
|
gcc \
|
|
|
|
binutils \
|
|
|
|
file \
|
|
|
|
pkg-config \
|
|
|
|
dpkg-dev \
|
|
|
|
# evmjit dependencies
|
|
|
|
zlib1g-dev \
|
|
|
|
libedit-dev \
|
|
|
|
cmake llvm-3.7-dev&&\
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# setup ENTRYPOINT
|
2017-01-25 19:25:52 +01:00
|
|
|
EXPOSE 8080 8545 8180
|
2017-02-17 10:48:37 +01:00
|
|
|
ENTRYPOINT ["/parity/parity"]
|