mirror of
https://github.com/sethforprivacy/p2pool-docker.git
synced 2025-12-06 15:52:37 -05:00
Bump to p2pool
This commit is contained in:
14
.github/workflows/update-base-image.yml
vendored
14
.github/workflows/update-base-image.yml
vendored
@@ -26,21 +26,15 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
- name: "Checkout repository"
|
- name: "Checkout repository"
|
||||||
uses: "actions/checkout@v2.3.4"
|
uses: "actions/checkout@v2.3.4"
|
||||||
-
|
|
||||||
name: "Get Monero Release Tag"
|
|
||||||
id: get_tag
|
|
||||||
run: echo "::set-output name=tag::$(awk -F "=" '/MONERO_BRANCH=/ {print $2}' Dockerfile)"
|
|
||||||
-
|
-
|
||||||
name: Build and push to Docker Hub and Github Packages Docker Registry
|
name: Build and push to Docker Hub and Github Packages Docker Registry
|
||||||
id: docker_build
|
id: docker_build
|
||||||
uses: docker/build-push-action@v2.7.0
|
uses: docker/build-push-action@v2.6.1
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ github.repository_owner }}/simple-monerod:latest
|
ghcr.io/${{ github.repository_owner }}/p2pool:latest
|
||||||
ghcr.io/${{ github.repository_owner }}/simple-monerod:${{ steps.get_tag.outputs.tag }}
|
${{ secrets.DOCKER_USERNAME }}/p2pool:latest
|
||||||
${{ secrets.DOCKER_USERNAME }}/simple-monerod:latest
|
|
||||||
${{ secrets.DOCKER_USERNAME }}/simple-monerod:${{ steps.get_tag.outputs.tag }}
|
|
||||||
labels: |
|
labels: |
|
||||||
org.opencontainers.image.source=${{ github.event.repository.html_url }}
|
org.opencontainers.image.source=${{ github.event.repository.html_url }}
|
||||||
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
|
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
|
||||||
@@ -49,7 +43,7 @@ jobs:
|
|||||||
name: Scan new image and output results
|
name: Scan new image and output results
|
||||||
uses: Azure/container-scan@v0
|
uses: Azure/container-scan@v0
|
||||||
with:
|
with:
|
||||||
image-name: ${{ secrets.DOCKER_USERNAME }}/simple-monerod:${{ steps.get_tag.outputs.tag }}
|
image-name: ${{ secrets.DOCKER_USERNAME }}/p2pool:latest
|
||||||
severity-threshold: HIGH
|
severity-threshold: HIGH
|
||||||
-
|
-
|
||||||
name: Image digest
|
name: Image digest
|
||||||
|
|||||||
16
.github/workflows/update-image-on-push.yml
vendored
16
.github/workflows/update-image-on-push.yml
vendored
@@ -27,32 +27,26 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
- name: "Checkout repository"
|
- name: "Checkout repository"
|
||||||
uses: "actions/checkout@v2.3.4"
|
uses: "actions/checkout@v2.3.4"
|
||||||
-
|
|
||||||
name: "Get Monero Release Tag"
|
|
||||||
id: get_tag
|
|
||||||
run: echo "::set-output name=tag::$(awk -F "=" '/MONERO_BRANCH=/ {print $2}' Dockerfile)"
|
|
||||||
-
|
-
|
||||||
name: Build and push to Docker Hub and Github Packages Docker Registry
|
name: Build and push to Docker Hub and Github Packages Docker Registry
|
||||||
id: docker_build
|
id: docker_build
|
||||||
uses: docker/build-push-action@v2.7.0
|
uses: docker/build-push-action@v2.6.1
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ github.repository_owner }}/simple-monerod:latest
|
ghcr.io/${{ github.repository_owner }}/p2pool:latest
|
||||||
ghcr.io/${{ github.repository_owner }}/simple-monerod:${{ steps.get_tag.outputs.tag }}
|
${{ secrets.DOCKER_USERNAME }}/p2pool:latest
|
||||||
${{ secrets.DOCKER_USERNAME }}/simple-monerod:latest
|
|
||||||
${{ secrets.DOCKER_USERNAME }}/simple-monerod:${{ steps.get_tag.outputs.tag }}
|
|
||||||
labels: |
|
labels: |
|
||||||
org.opencontainers.image.source=${{ github.event.repository.html_url }}
|
org.opencontainers.image.source=${{ github.event.repository.html_url }}
|
||||||
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
|
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
|
||||||
org.opencontainers.image.revision=${{ github.sha }}
|
org.opencontainers.image.revision=${{ github.sha }}
|
||||||
cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/simple-monerod:latest
|
cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/p2pool:latest
|
||||||
cache-to: type=inline
|
cache-to: type=inline
|
||||||
-
|
-
|
||||||
name: Scan new image and output results
|
name: Scan new image and output results
|
||||||
uses: Azure/container-scan@v0
|
uses: Azure/container-scan@v0
|
||||||
with:
|
with:
|
||||||
image-name: ${{ secrets.DOCKER_USERNAME }}/simple-monerod:${{ steps.get_tag.outputs.tag }}
|
image-name: ${{ secrets.DOCKER_USERNAME }}/p2pool:latest
|
||||||
severity-threshold: HIGH
|
severity-threshold: HIGH
|
||||||
-
|
-
|
||||||
name: Image digest
|
name: Image digest
|
||||||
|
|||||||
50
Dockerfile
50
Dockerfile
@@ -1,6 +1,3 @@
|
|||||||
# From https://github.com/leonardochaia/docker-monerod/blob/master/src/Dockerfile
|
|
||||||
ARG MONERO_BRANCH=v0.17.2.0
|
|
||||||
|
|
||||||
# Select Ubuntu 20.04LTS for the build image base
|
# Select Ubuntu 20.04LTS for the build image base
|
||||||
FROM ubuntu:20.04 as build
|
FROM ubuntu:20.04 as build
|
||||||
LABEL author="sethsimmons@pm.me" \
|
LABEL author="sethsimmons@pm.me" \
|
||||||
@@ -10,12 +7,9 @@ LABEL author="sethsimmons@pm.me" \
|
|||||||
# Added DEBIAN_FRONTEND=noninteractive to workaround tzdata prompt on installation
|
# Added DEBIAN_FRONTEND=noninteractive to workaround tzdata prompt on installation
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get upgrade -y \
|
&& apt-get upgrade -y \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends build-essential cmake \
|
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends git \
|
||||||
pkg-config libboost-all-dev libssl-dev libzmq3-dev libunbound-dev ca-certificates \
|
build-essential cmake libuv1-dev libzmq3-dev libsodium-dev libpgm-dev libnorm-dev \
|
||||||
libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev libldns-dev \
|
libgss-dev \
|
||||||
libexpat1-dev doxygen graphviz libpgm-dev qttools5-dev-tools libhidapi-dev \
|
|
||||||
libusb-dev libprotobuf-dev protobuf-compiler libgtest-dev git \
|
|
||||||
libnorm-dev libpgm-dev libusb-1.0-0-dev libudev-dev libgssapi-krb5-2 \
|
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
@@ -24,24 +18,15 @@ ENV CXXFLAGS='-fPIC'
|
|||||||
ENV USE_SINGLE_BUILDDIR 1
|
ENV USE_SINGLE_BUILDDIR 1
|
||||||
ENV BOOST_DEBUG 1
|
ENV BOOST_DEBUG 1
|
||||||
|
|
||||||
# Switch to directory for gtest and make/install libs
|
|
||||||
WORKDIR /usr/src/gtest
|
|
||||||
RUN cmake . \
|
|
||||||
&& make \
|
|
||||||
&& cp ./lib/libgtest*.a /usr/lib
|
|
||||||
|
|
||||||
# Switch to Monero source directory
|
# Switch to Monero source directory
|
||||||
WORKDIR /monero
|
WORKDIR /p2pool
|
||||||
|
|
||||||
# Git pull Monero source at specified tag/branch
|
# Git pull Monero source at specified tag/branch
|
||||||
ARG MONERO_BRANCH
|
RUN git clone --recursive https://github.com/SChernykh/p2pool .
|
||||||
RUN git clone --recursive --branch ${MONERO_BRANCH} \
|
|
||||||
https://github.com/monero-project/monero . \
|
|
||||||
&& git submodule init && git submodule update
|
|
||||||
|
|
||||||
# Make static Monero binaries
|
# Make static Monero binaries
|
||||||
ARG NPROC
|
ARG NPROC
|
||||||
RUN test -z "$NPROC" && nproc > /nproc || echo -n "$NPROC" > /nproc && make -j"$(cat /nproc)" release-static
|
RUN test -z "$NPROC" && nproc > /nproc || echo -n "$NPROC" > /nproc && mkdir build && cd build && cmake .. && make -j"$(cat /nproc)"
|
||||||
|
|
||||||
# Select Ubuntu 20.04LTS for the image base
|
# Select Ubuntu 20.04LTS for the image base
|
||||||
FROM ubuntu:20.04
|
FROM ubuntu:20.04
|
||||||
@@ -49,27 +34,22 @@ FROM ubuntu:20.04
|
|||||||
# Install remaining dependencies
|
# Install remaining dependencies
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get upgrade -y \
|
&& apt-get upgrade -y \
|
||||||
&& apt-get install --no-install-recommends -y curl libnorm-dev libpgm-dev libgssapi-krb5-2 \
|
&& apt-get install --no-install-recommends -y libuv1-dev libzmq3-dev libsodium-dev libpgm-dev libnorm-dev libgss-dev \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Add user and setup directories for monerod
|
# Add user and setup directories for monerod
|
||||||
RUN useradd -ms /bin/bash monero \
|
RUN useradd -ms /bin/bash p2pool
|
||||||
&& mkdir -p /home/monero/.bitmonero \
|
USER p2pool
|
||||||
&& chown -R monero:monero /home/monero/.bitmonero
|
|
||||||
USER monero
|
|
||||||
|
|
||||||
# Switch to home directory and install newly built monerod binary
|
# Switch to home directory and install newly built monerod binary
|
||||||
WORKDIR /home/monero
|
WORKDIR /home/p2pool
|
||||||
COPY --chown=monero:monero --from=build /monero/build/release/bin/monerod /usr/local/bin/monerod
|
COPY --chown=p2pool:p2pool --from=build /p2pool/build/p2pool /usr/local/bin/p2pool
|
||||||
|
|
||||||
# Expose p2p and restricted RPC ports
|
# Expose p2p and restricted RPC ports
|
||||||
EXPOSE 18080
|
EXPOSE 3333
|
||||||
EXPOSE 18089
|
EXPOSE 37889
|
||||||
|
|
||||||
# Add HEALTHCHECK against get_info endpoint
|
|
||||||
HEALTHCHECK --interval=30s --timeout=5s CMD curl --fail http://localhost:18089/get_info || exit 1
|
|
||||||
|
|
||||||
# Start monerod with required --non-interactive flag and sane defaults that are overridden by user input (if applicable)
|
# Start monerod with required --non-interactive flag and sane defaults that are overridden by user input (if applicable)
|
||||||
ENTRYPOINT ["monerod", "--non-interactive"]
|
ENTRYPOINT ["p2pool"]
|
||||||
CMD ["--rpc-restricted-bind-ip=0.0.0.0", "--rpc-restricted-bind-port=18089", "--no-igd", "--no-zmq", "--enable-dns-blocklist"]
|
CMD ["--host monerod", "--stratum 0.0.0.0:3333", "--p2p 0.0.0.0:37889", "--addpeers 65.21.227.114:37889", "--addpeers node.sethforprivacy.com:37889"]
|
||||||
|
|||||||
48
README.md
48
README.md
@@ -1,57 +1,31 @@
|
|||||||
# simple-monerod-docker
|
# p2pool-docker
|
||||||
A simple and straightforward Dockerized monerod built from source and exposing standard ports.
|
A simple and straightforward Dockerized [p2pool](https://github.com/SChernykh/p2pool) built from source and exposing standard ports.
|
||||||
|
|
||||||
## Actions
|
## Actions
|
||||||
|
|
||||||
[](https://github.com/sethsimmons/simple-monerod-docker/actions/workflows/update-base-image.yml)
|
[](https://github.com/sethsimmons/p2pool-docker/actions/workflows/update-base-image.yml)
|
||||||
[](https://github.com/sethsimmons/simple-monerod-docker/actions/workflows/update-image-on-push.yml)
|
[](https://github.com/sethsimmons/p2pool-docker/actions/workflows/update-image-on-push.yml)
|
||||||
[](https://github.com/sethsimmons/simple-monerod-docker/actions/workflows/trivy-analysis.yml)
|
[](https://github.com/sethsimmons/p2pool-docker/actions/workflows/trivy-analysis.yml)
|
||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
# Docker Hub
|
# Docker Hub
|
||||||
This repo is used to build the images available at:
|
This repo is used to build the images available at:
|
||||||
|
|
||||||
https://hub.docker.com/r/sethsimmons/simple-monerod
|
https://hub.docker.com/r/sethsimmons/p2pool
|
||||||
|
|
||||||
# Tags
|
# Tags
|
||||||
I will always release the latest Monero version under the `latest` tag as well as the version number tag (i.e. `v0.17.1.9`).
|
I will always release the latest Monero version under the `latest` tag.
|
||||||
|
|
||||||
`latest`: The latest tagged version of Monero from https://github.com/monero-project/monero/tags
|
`latest`: The latest tagged version of Monero from https://github.com/monero-project/monero/tags
|
||||||
`vx.xx.x.x`: The version corresponding with the tagged version from https://github.com/monero-project/monero/tags
|
|
||||||
|
|
||||||
# Recommended usage
|
# Recommended usage
|
||||||
|
|
||||||
I am using this container for my guide on running a Monero node:
|
TBD
|
||||||
|
|
||||||
https://sethforprivacy.com/guides/run-a-monero-node/
|
|
||||||
|
|
||||||
The ways I would generally recommend running this container for a personal or public Monero node are below.
|
|
||||||
|
|
||||||
monerod Docker w/o public RPC:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo docker run -d --restart unless-stopped --name="monerod" -v bitmonero:/home/monero sethsimmons/simple-monerod:latest --rpc-restricted-bind-ip=0.0.0.0 --rpc-restricted-bind-port=18089 --no-igd --no-zmq --enable-dns-blocklist
|
|
||||||
```
|
|
||||||
|
|
||||||
monerod Docker w/ public RPC:
|
|
||||||
```
|
|
||||||
sudo docker run -d --restart unless-stopped --name="monerod" -v bitmonero:/home/monero sethsimmons/simple-monerod:latest --rpc-restricted-bind-ip=0.0.0.0 --rpc-restricted-bind-port=18089 --public-node --no-igd --no-zmq --enable-dns-blocklist
|
|
||||||
```
|
|
||||||
|
|
||||||
monerod Docker w/o public RPC (pruned):
|
|
||||||
```
|
|
||||||
sudo docker run -d --restart unless-stopped --name="monerod" -v bitmonero:/home/monero sethsimmons/simple-monerod:latest --rpc-restricted-bind-ip=0.0.0.0 --rpc-restricted-bind-port=18089 --no-igd --no-zmq --enable-dns-blocklist --prune-blockchain
|
|
||||||
```
|
|
||||||
|
|
||||||
monerod Docker w/ public RPC (pruned):
|
|
||||||
```
|
|
||||||
sudo docker run -d --restart unless-stopped --name="monerod" -v bitmonero:/home/monero sethsimmons/simple-monerod:latest --rpc-restricted-bind-ip=0.0.0.0 --rpc-restricted-bind-port=18089 --public-node --no-igd --no-zmq --enable-dns-blocklist --prune-blockchain
|
|
||||||
```
|
|
||||||
|
|
||||||
# Copyrights
|
# Copyrights
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,20 @@ services:
|
|||||||
- "--no-igd"
|
- "--no-igd"
|
||||||
- "--enable-dns-blocklist"
|
- "--enable-dns-blocklist"
|
||||||
- "--prune-blockchain"
|
- "--prune-blockchain"
|
||||||
|
|
||||||
|
p2pool:
|
||||||
|
image: sethsimmons/p2pool:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
container_name: p2pool
|
||||||
|
volumes:
|
||||||
|
- p2pool-data:/home/monero
|
||||||
|
ports:
|
||||||
|
- 3333:3333
|
||||||
|
- 37889:37889
|
||||||
|
command:
|
||||||
|
- "--host monerod"
|
||||||
|
- "--rpc-port 18089"
|
||||||
|
- "--wallet MoneroAddress"
|
||||||
|
|
||||||
tor:
|
tor:
|
||||||
image: goldy/tor-hidden-service:latest
|
image: goldy/tor-hidden-service:latest
|
||||||
|
|||||||
Reference in New Issue
Block a user