Skip to content

Instantly share code, notes, and snippets.

@koddo
Last active January 16, 2017 22:19
Show Gist options
  • Save koddo/5e339f55e6ba3b80ba9deafa1365e935 to your computer and use it in GitHub Desktop.
Save koddo/5e339f55e6ba3b80ba9deafa1365e935 to your computer and use it in GitHub Desktop.
build a docker image with ethcore/parity master, see comments
FROM ubuntu:14.04
WORKDIR /build
# install tools and dependencies
RUN apt-get update && \
apt-get install -y \
g++ \
build-essential \
curl \
git \
file \
binutils \
libssl-dev pkg-config
# install rustup
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
# rustup directory
ENV PATH /root/.cargo/bin:$PATH
# show backtraces
ENV RUST_BACKTRACE 1
# show tools
RUN rustc -vV && \
cargo -V && \
gcc -v &&\
g++ -v
# build parity
RUN git clone https://github.com/ethcore/parity && \
cd parity && \
git checkout 4b85e3e . && \
git pull && \
cargo build --release --verbose && \
ls /build/parity/target/release/parity && \
strip /build/parity/target/release/parity
RUN file /build/parity/target/release/parity
EXPOSE 8080 8545 8180
ENTRYPOINT ["/build/parity/target/release/parity"]
@koddo
Copy link
Author

koddo commented Jan 16, 2017

  1. https://github.com/ethcore/parity/wiki/Private-development-chain: "Currently available only in the master branch".
    Find last successful build of master branch: https://travis-ci.org/ethcore/parity/builds

  2. The Dockerfile in this gist is modified Dockerfile for parity:beta: https://github.com/ethcore/parity/blob/master/docker/ubuntu/Dockerfile
    Added libssl-dev pkg-config to apt-get install.
    Changed this line to chechout last successfully built commit (dot is important): git checkout beta && \ -> git checkout 4b85e3e . && \

  3. Build, run.

$ wget https://gist.githubusercontent.com/koddo/5e339f55e6ba3b80ba9deafa1365e935/raw/Dockerfile
$ docker build . --tag ethcore_parity_master
...

$ docker run --rm -it ethcore_parity_master --chain dev
2017-01-16 17:47:32 UTC Starting Parity/v1.6.0-unstable-f807aa6-20170116/x86_64-linux-gnu/rustc1.14.0
2017-01-16 17:47:32 UTC State DB configuration: fast
2017-01-16 17:47:32 UTC Operating mode: active
2017-01-16 17:47:32 UTC Configured for DevelopmentChain using InstantSeal engine
2017-01-16 17:47:38 UTC Public node URL: enode://b4777be412e96e7c2c10c4351bc4693b74890c9b3196ffbaaaeaa2e803caecda2706a3422ed253631913d5e4d6d5323b813819ae03a7a08c84adee0c65f331af@172.17.0.3:30303
2017-01-16 17:48:03 UTC     0/ 0/25 peers      7 KiB db    7 KiB chain  0 bytes queue 448 bytes sync

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment