This commit is contained in:
Zimovskii Anatolii 2022-09-05 19:25:26 +03:00
parent e64657c400
commit 0577de8bda
Signed by: stam
GPG Key ID: 9911D9EF664EEE14
8 changed files with 234 additions and 2 deletions

View File

@ -508,7 +508,12 @@ bundle-atlassian:
cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.3.0 && pwd && make build && make deploy
cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.3.1 && pwd && make build && make deploy
bundle-monero
@echo "======================================="
@echo "===== Building Monerod images ====="
@echo "======================================="
cd `pwd`/linux/ecosystem/monero/monerod && pwd && make build && make deploy
cd `pwd`/linux/ecosystem/monero/p2pool && pwd && make build && make deploy
bundle-web:
@echo "======================================="

View File

@ -15,7 +15,7 @@ ENV PATH="${PATH}:${MONERO_BIN}"
##################################################################
# Installing
##################################################################
RUN mkdir /monero /monero/bin /monero/data
RUN mkdir ${MONERO_DIR} ${MONERO_BIN} ${MONERO_DATA}
RUN apt-get update && \
apt-get install -y \
@ -47,3 +47,13 @@ ENTRYPOINT [ "/entrypoint.sh" ]
# Start monerod with sane defaults that are overridden by user input (if applicable)
CMD ["--rpc-restricted-bind-ip=0.0.0.0", "--rpc-restricted-bind-port=18089", "--no-igd", "--no-zmq", "--enable-dns-blocklist"]
##################################################################
# 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

View File

@ -0,0 +1,55 @@
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_BIN=${P2POOL_DIR}/bin
ENV P2POOL_DATA=${P2POOL_DIR}/data
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
ENV PATH="${PATH}:${P2POOL_BIN}"
##################################################################
# Installing
##################################################################
RUN mkdir -p ${P2POOL_DIR} ${P2POOL_BIN} ${P2POOL_DATA}
# 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/*
RUN echo ${P2POOL_BIN}
RUN wget -qO- ${P2POOL_DOWNLOAD_URL} | tar -xvz --strip-components=1 -C ${P2POOL_BIN}
RUN export PATH="${PATH}:${P2POOL_BIN}"
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
# 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

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 Seth Simmons (@sethsimmons)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,19 @@
all: app
app:
make build
make deploy
make clean
build:
docker-compose build --compress --parallel --progress plain
deploy:
docker-compose push
clean:
docker container prune -f
docker image prune -f
docker network prune -f
docker volume prune -f
docker system prune -af

View File

@ -0,0 +1,41 @@
# p2pool-docker
A simple and straightforward Dockerized [p2pool](https://github.com/SChernykh/p2pool) built from source and exposing standard ports.
## Actions
[![Daily Update Rebuild](https://github.com/sethsimmons/p2pool-docker//actions/workflows/update-daily.yml/badge.svg)](https://github.com/sethsimmons/p2pool-docker/actions/workflows/update-daily.yml)
[![Weekly Update Rebuild](https://github.com/sethsimmons/p2pool-docker//actions/workflows/update-base-image.yml/badge.svg)](https://github.com/sethsimmons/p2pool-docker/actions/workflows/update-base-image.yml)
[![Latest Dockerfile build](https://github.com/sethsimmons/p2pool-docker//actions/workflows/update-image-on-push.yml/badge.svg)](https://github.com/sethsimmons/p2pool-docker/actions/workflows/update-image-on-push.yml)
[![Container security scan with Trivy](https://github.com/sethsimmons/p2pool-docker//actions/workflows/trivy-analysis.yml/badge.svg)](https://github.com/sethsimmons/p2pool-docker/actions/workflows/trivy-analysis.yml)
## Docker
![Docker Pulls](https://img.shields.io/docker/pulls/sethsimmons/p2pool)
![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/sethsimmons/p2pool)
![Docker Image Version (latest by date)](https://img.shields.io/docker/v/sethsimmons/p2pool)
# Docker Hub
This repo is used to build the images available at:
https://hub.docker.com/r/sethsimmons/p2pool
# Tags
`latest`: The daily rebuild from source at https://github.com/SChernykh/p2pool
# Recommended usage
*NOTE: Remember to replace the host address with your own node (if desired) as well as the Monero address for the `--wallet` flag, or else you'll be making a kind hashrate donation to me.*
```bash
docker run -d --name="p2pool" -p 3333:3333 -p 37889:37889 -v p2pool-data:/home/p2pool -v /dev/hugepages:/dev/hugepages:rw sethsimmons/p2pool:latest --host 5.9.120.18 --rpc-port 18089 --wallet 468ydghFfthE3UTc53eF5MP9UyrMcUiAHP5kizVYJsej5XGaXBoAAEzUHCcUF7t3E3RrYAX8Rs1ujhBdcvMpZSbH8qkb55R --stratum 0.0.0.0:3333 --p2p 0.0.0.0:37889 --addpeers 65.21.227.114:37889,node.sethforprivacy.com:37889
```
# Copyrights
Code from this repository is released under MIT license. [Monero License](https://github.com/monero-project/monero/blob/master/LICENSE), [@leonardochaia License](https://github.com/leonardochaia/docker-monerod/blob/master/LICENSE)
# Credits
The base for the Dockerfile was pulled from:
https://github.com/leonardochaia/docker-monerod

View File

@ -0,0 +1,7 @@
version: '3.9'
services:
app:
image: "epicmorg/monero:p2pool"
build:
context: .

View File

@ -0,0 +1,74 @@
version: '3.5'
services:
monerod:
image: sethsimmons/simple-monerod:latest
restart: unless-stopped
container_name: monerod
volumes:
- bitmonero:/home/monero
ports:
- 18080:18080
- 18083:18083
- 18089:18089
command:
- "--rpc-restricted-bind-ip=0.0.0.0"
- "--rpc-restricted-bind-port=18089"
- "--public-node"
- "--no-igd"
- "--enable-dns-blocklist"
- "--prune-blockchain"
- "--zmq-pub=tcp://0.0.0.0:18083"
- "--out-peers=50"
p2pool:
image: sethsimmons/p2pool:latest
restart: unless-stopped
container_name: p2pool
tty: true
stdin_open: true
volumes:
- p2pool-data:/home/p2pool
- /dev/hugepages:/dev/hugepages:rw
ports:
- 3333:3333
- 37889:37889
command: >-
--wallet "468ydghFfthE3UTc53eF5MP9UyrMcUiAHP5kizVYJsej5XGaXBoAAEzUHCcUF7t3E3RrYAX8Rs1ujhBdcvMpZSbH8qkb55R"
--stratum "0.0.0.0:3333" --p2p "0.0.0.0:37889" --rpc-port "18089"
--addpeers "65.21.227.114:37889,node.sethforprivacy.com:37889" --host "monerod"
tor:
image: goldy/tor-hidden-service:latest
container_name: tor
restart: unless-stopped
links:
- monerod
- p2pool
environment:
MONEROD_TOR_SERVICE_HOSTS: 18089:monerod:18089
MONEROD_TOR_SERVICE_VERSION: '3'
P2POOL_TOR_SERVICE_HOSTS: 3333:p2pool:3333
P2POOL_TOR_SERVICE_VERSION: '3'
volumes:
- tor-keys:/var/lib/tor/hidden_service/
autoheal:
image: willfarrell/autoheal:latest
container_name: autoheal
restart: unless-stopped
environment:
AUTOHEAL_CONTAINER_LABEL: all
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
watchtower:
image: containrrr/watchtower:latest
container_name: watchtower
restart: unless-stopped
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
volumes:
bitmonero:
tor-keys:
p2pool-data: