Skip to content

Commit

Permalink
Merge pull request vertcoin-project#48 from dmp1ce/dockerfile
Browse files Browse the repository at this point in the history
Add Dockerfile
  • Loading branch information
jtoomim authored Jun 2, 2020
2 parents 32d5f62 + 00d31d8 commit 87cde51
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
39 changes: 39 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Dockerfile for P2Pool Server

FROM ubuntu:20.04

LABEL maintainer David Parrish <[email protected]>
LABEL description="Dockerized P2Pool"

WORKDIR /p2pool
ENV P2POOL_HOME /p2pool/p2pool
ENV P2POOL_REPO https://github.com/jtoomim/p2pool.git


# Using installation instructions for Linux
# https://github.com/jtoomim/p2pool/blob/155022fc942ec45778a95622766a9b11d923e76e/README.md
# hadolint ignore=DL3003
RUN apt-get update \
&& apt-get -y --no-install-recommends install ca-certificates=20* pypy=7.* pypy-dev=7.* pypy-setuptools=44.* gcc=4:9.* build-essential=12.* git=1:2.* wget=1.* \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir $P2POOL_HOME \
&& bash -c "wget https://bootstrap.pypa.io/ez_setup.py -O - | pypy" \
&& rm setuptools-*.zip \
&& wget https://pypi.python.org/packages/source/z/zope.interface/zope.interface-4.1.3.tar.gz#md5=9ae3d24c0c7415deb249dd1a132f0f79 \
&& tar zxf zope.interface-4.1.3.tar.gz \
&& cd /p2pool/zope.interface-4.1.3 \
&& pypy setup.py install \
&& cd /p2pool \
&& rm -r zope.interface-4.1.3* \
&& wget https://pypi.python.org/packages/source/T/Twisted/Twisted-15.4.0.tar.bz2 \
&& tar jxf Twisted-15.4.0.tar.bz2 \
&& cd /p2pool/Twisted-15.4.0 \
&& pypy setup.py install \
&& cd /p2pool \
&& rm -r Twisted-15.4.0*

COPY . $P2POOL_HOME

WORKDIR $P2POOL_HOME
ENTRYPOINT ["pypy", "run_p2pool.py"]
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@ You'll also need to install and run your bitcoind or altcoind of choice, and edi

>pypy run_p2pool.py
**P2pool Dockerfile

The Dockerfile uses the build instruction above to create a Docker image.

Build Docker image named `p2pool`

>docker build -t p2pool ./
Run p2pool from Docker image

>docker run -it --rm p2pool --version
**jtoomimnet vs mainnet**

Expand Down

0 comments on commit 87cde51

Please sign in to comment.