Skip to content

Instantly share code, notes, and snippets.

@Haaroon
Created June 24, 2018 16:00
Show Gist options
  • Save Haaroon/8127b6e5c31ffc46d1904a18a45be550 to your computer and use it in GitHub Desktop.
Save Haaroon/8127b6e5c31ffc46d1904a18a45be550 to your computer and use it in GitHub Desktop.
Parity Ethereum Client Docker file
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 \
libudev-dev
RUN apt-get update
# 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
# clone parity
RUN git clone https://github.com/paritytech/parity
WORKDIR parity
# build parity
ADD . /build/parity
RUN cargo build --release --verbose && \
ls /build/parity/target/release/parity && \
strip /build/parity/target/release/parity
VOLUME ['/root/.parity']
EXPOSE 8080 8545 8180
CMD /build/parity/target/release/parity --base-path=/root/.parity --chain=mainnet --ui-interface all --jsonrpc-interface all && bash
@Haaroon
Copy link
Author

Haaroon commented Jun 24, 2018

Run via docker, first build then run

 docker build -f Dockerfile --tag eth .
 docker run -d --name eth \
    -v /data/data1/nodedata/.etc:/root/.parity \
    -p 8545:8545 \
    -it eth

Note --jsonrpc-interface all and the port forward above means the host machine can connect and execute rpc commands over curl through localhost:8545, remove that if not needed (+ for security)

This works for ethereum classic as well, just change --chain=mainnet to --chain=classic

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