docker-scripts/linux/ecosystem/monero/p2pool/Dockerfile

53 lines
1.9 KiB
Docker
Raw Normal View History

2022-09-05 19:25:26 +03:00
FROM epicmorg/debian:bullseye
LABEL maintainer="original by sethforprivacy; EpicMorg DevTeam, developer@epicm.org"
ARG DEBIAN_FRONTEND=noninteractive
##################################################################
# ARGuments
##################################################################
ENV P2POOL_DIR=/p2pool
ENV P2POOL_VERSION=2.3
ENV P2POOL_DOWNLOAD_URL=https://github.com/SChernykh/p2pool/releases/download/v${P2POOL_VERSION}/p2pool-v${P2POOL_VERSION}-linux-x64.tar.gz
##################################################################
# Installing
##################################################################
2022-09-13 12:17:40 +03:00
RUN mkdir -p ${P2POOL_DIR}
2022-09-05 19:25:26 +03:00
# Install remaining dependencies
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install --no-install-recommends -y libuv1-dev libzmq3-dev libsodium-dev \
libpgm-dev libnorm-dev libgss-dev libcurl4-openssl-dev libidn2-0-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
2022-09-13 12:17:40 +03:00
RUN wget -qO- ${P2POOL_DOWNLOAD_URL} | tar -xvz --strip-components=1 -C /tmp
2022-09-05 19:25:26 +03:00
2022-09-13 12:17:40 +03:00
RUN mv /tmp/p2pool /bin
2022-09-05 19:25:26 +03:00
RUN p2pool --help
# Switch to home directory and install newly built p2pool binary
WORKDIR ${P2POOL_DIR}
# Expose p2p and restricted RPC ports
EXPOSE 3333
EXPOSE 37889
2022-09-13 12:17:40 +03:00
EXPOSE 37888
2022-09-05 19:25:26 +03:00
# Start p2pool with required --non-interactive flag and sane defaults that are overridden by user input (if applicable)
ENTRYPOINT ["p2pool"]
CMD ["--host p2pool", "--stratum 0.0.0.0:3333", "--p2p 0.0.0.0:37889", "--addpeers 65.21.227.114:37889", "--addpeers node.sethforprivacy.com:37889"]
##################################################################
# cleanup
##################################################################
RUN apt-get purge policykit-1 -y && \
apt-get clean -y && \
apt-get autoclean -y && \
rm -rfv /var/lib/apt/lists/* && \
rm -rfv /tmp/* && \
rm -rfv /var/cache/apt/archives/*.deb