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 }}
|
||||
- name: "Checkout repository"
|
||||
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
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2.7.0
|
||||
uses: docker/build-push-action@v2.6.1
|
||||
with:
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository_owner }}/simple-monerod:latest
|
||||
ghcr.io/${{ github.repository_owner }}/simple-monerod:${{ steps.get_tag.outputs.tag }}
|
||||
${{ secrets.DOCKER_USERNAME }}/simple-monerod:latest
|
||||
${{ secrets.DOCKER_USERNAME }}/simple-monerod:${{ steps.get_tag.outputs.tag }}
|
||||
ghcr.io/${{ github.repository_owner }}/p2pool:latest
|
||||
${{ secrets.DOCKER_USERNAME }}/p2pool:latest
|
||||
labels: |
|
||||
org.opencontainers.image.source=${{ github.event.repository.html_url }}
|
||||
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
|
||||
@@ -49,7 +43,7 @@ jobs:
|
||||
name: Scan new image and output results
|
||||
uses: Azure/container-scan@v0
|
||||
with:
|
||||
image-name: ${{ secrets.DOCKER_USERNAME }}/simple-monerod:${{ steps.get_tag.outputs.tag }}
|
||||
image-name: ${{ secrets.DOCKER_USERNAME }}/p2pool:latest
|
||||
severity-threshold: HIGH
|
||||
-
|
||||
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 }}
|
||||
- name: "Checkout repository"
|
||||
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
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2.7.0
|
||||
uses: docker/build-push-action@v2.6.1
|
||||
with:
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository_owner }}/simple-monerod:latest
|
||||
ghcr.io/${{ github.repository_owner }}/simple-monerod:${{ steps.get_tag.outputs.tag }}
|
||||
${{ secrets.DOCKER_USERNAME }}/simple-monerod:latest
|
||||
${{ secrets.DOCKER_USERNAME }}/simple-monerod:${{ steps.get_tag.outputs.tag }}
|
||||
ghcr.io/${{ github.repository_owner }}/p2pool:latest
|
||||
${{ secrets.DOCKER_USERNAME }}/p2pool:latest
|
||||
labels: |
|
||||
org.opencontainers.image.source=${{ github.event.repository.html_url }}
|
||||
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
|
||||
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
|
||||
-
|
||||
name: Scan new image and output results
|
||||
uses: Azure/container-scan@v0
|
||||
with:
|
||||
image-name: ${{ secrets.DOCKER_USERNAME }}/simple-monerod:${{ steps.get_tag.outputs.tag }}
|
||||
image-name: ${{ secrets.DOCKER_USERNAME }}/p2pool:latest
|
||||
severity-threshold: HIGH
|
||||
-
|
||||
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
|
||||
FROM ubuntu:20.04 as build
|
||||
LABEL author="sethsimmons@pm.me" \
|
||||
@@ -10,12 +7,9 @@ LABEL author="sethsimmons@pm.me" \
|
||||
# Added DEBIAN_FRONTEND=noninteractive to workaround tzdata prompt on installation
|
||||
RUN apt-get update \
|
||||
&& apt-get upgrade -y \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends build-essential cmake \
|
||||
pkg-config libboost-all-dev libssl-dev libzmq3-dev libunbound-dev ca-certificates \
|
||||
libsodium-dev libunwind8-dev liblzma-dev libreadline6-dev libldns-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 \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends git \
|
||||
build-essential cmake libuv1-dev libzmq3-dev libsodium-dev libpgm-dev libnorm-dev \
|
||||
libgss-dev \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -24,24 +18,15 @@ ENV CXXFLAGS='-fPIC'
|
||||
ENV USE_SINGLE_BUILDDIR 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
|
||||
WORKDIR /monero
|
||||
WORKDIR /p2pool
|
||||
|
||||
# Git pull Monero source at specified tag/branch
|
||||
ARG MONERO_BRANCH
|
||||
RUN git clone --recursive --branch ${MONERO_BRANCH} \
|
||||
https://github.com/monero-project/monero . \
|
||||
&& git submodule init && git submodule update
|
||||
RUN git clone --recursive https://github.com/SChernykh/p2pool .
|
||||
|
||||
# Make static Monero binaries
|
||||
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
|
||||
FROM ubuntu:20.04
|
||||
@@ -49,27 +34,22 @@ FROM ubuntu:20.04
|
||||
# Install remaining dependencies
|
||||
RUN apt-get update \
|
||||
&& 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 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Add user and setup directories for monerod
|
||||
RUN useradd -ms /bin/bash monero \
|
||||
&& mkdir -p /home/monero/.bitmonero \
|
||||
&& chown -R monero:monero /home/monero/.bitmonero
|
||||
USER monero
|
||||
RUN useradd -ms /bin/bash p2pool
|
||||
USER p2pool
|
||||
|
||||
# Switch to home directory and install newly built monerod binary
|
||||
WORKDIR /home/monero
|
||||
COPY --chown=monero:monero --from=build /monero/build/release/bin/monerod /usr/local/bin/monerod
|
||||
WORKDIR /home/p2pool
|
||||
COPY --chown=p2pool:p2pool --from=build /p2pool/build/p2pool /usr/local/bin/p2pool
|
||||
|
||||
# Expose p2p and restricted RPC ports
|
||||
EXPOSE 18080
|
||||
EXPOSE 18089
|
||||
|
||||
# Add HEALTHCHECK against get_info endpoint
|
||||
HEALTHCHECK --interval=30s --timeout=5s CMD curl --fail http://localhost:18089/get_info || exit 1
|
||||
EXPOSE 3333
|
||||
EXPOSE 37889
|
||||
|
||||
# Start monerod with required --non-interactive flag and sane defaults that are overridden by user input (if applicable)
|
||||
ENTRYPOINT ["monerod", "--non-interactive"]
|
||||
CMD ["--rpc-restricted-bind-ip=0.0.0.0", "--rpc-restricted-bind-port=18089", "--no-igd", "--no-zmq", "--enable-dns-blocklist"]
|
||||
ENTRYPOINT ["p2pool"]
|
||||
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
|
||||
A simple and straightforward Dockerized monerod built from source and exposing standard ports.
|
||||
# p2pool-docker
|
||||
A simple and straightforward Dockerized [p2pool](https://github.com/SChernykh/p2pool) built from source and exposing standard ports.
|
||||
|
||||
## Actions
|
||||
|
||||
[](https://github.com/sethsimmons/simple-monerod-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/simple-monerod-docker/actions/workflows/trivy-analysis.yml)
|
||||
[](https://github.com/sethsimmons/p2pool-docker/actions/workflows/update-base-image.yml)
|
||||
[](https://github.com/sethsimmons/p2pool-docker/actions/workflows/update-image-on-push.yml)
|
||||
[](https://github.com/sethsimmons/p2pool-docker/actions/workflows/trivy-analysis.yml)
|
||||
|
||||
## Docker
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
# Docker Hub
|
||||
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
|
||||
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
|
||||
`vx.xx.x.x`: The version corresponding with the tagged version from https://github.com/monero-project/monero/tags
|
||||
|
||||
# Recommended usage
|
||||
|
||||
I am using this container for my guide on running a Monero node:
|
||||
|
||||
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
|
||||
```
|
||||
TBD
|
||||
|
||||
# Copyrights
|
||||
|
||||
|
||||
@@ -17,6 +17,20 @@ services:
|
||||
- "--enable-dns-blocklist"
|
||||
- "--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:
|
||||
image: goldy/tor-hidden-service:latest
|
||||
container_name: tor
|
||||
|
||||
Reference in New Issue
Block a user