mirror of
https://github.com/sethforprivacy/p2pool-docker.git
synced 2025-12-07 16:05:05 -05:00
Compare commits
65 Commits
67addf8338
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
37d68bc1bd | ||
|
|
dae74873c4 | ||
|
|
d37c6f7bdf | ||
|
|
84ebde54dd | ||
|
|
e834b7e289 | ||
|
|
389cc18843 | ||
|
|
93c985963a | ||
|
|
8d209c335a | ||
|
|
2baed31844 | ||
|
|
c591b338f3 | ||
|
|
a1a95d5294 | ||
|
|
0bc7dba09d | ||
|
|
49019ab2f9 | ||
|
|
53c1baaaf2 | ||
|
|
1fdd47de76 | ||
|
|
f2a46b8a21 | ||
|
|
679ac1e87e | ||
|
|
cbf7fbfb7e | ||
|
|
382708175c | ||
|
|
e4d02db831 | ||
|
|
ef64a6db7d | ||
|
|
d3a1a704b8 | ||
|
|
8178e7df3e | ||
|
|
9b158c86c2 | ||
|
|
031bd91913 | ||
|
|
2bd817c6c2 | ||
|
|
b77b8d9d7c | ||
|
|
f34b0b4e7a | ||
|
|
77f6cd5311 | ||
|
|
9719c48897 | ||
|
|
2290ddb6b9 | ||
|
|
843f97b1cf | ||
|
|
6945b17b5d | ||
|
|
df89ed309f | ||
|
|
f181dbcd59 | ||
|
|
89ca118508 | ||
|
|
9d6980c6d2 | ||
|
|
501a27001b | ||
|
|
35a6c3a3ed | ||
|
|
bfe73f3409 | ||
|
|
9925a8d336 | ||
|
|
c699d76908 | ||
|
|
ee90239c6b | ||
|
|
28104934af | ||
|
|
d2494e9deb | ||
|
|
76b1d9164c | ||
|
|
ec715061c0 | ||
|
|
90af90e29a | ||
|
|
9b66c26a8d | ||
|
|
ba800e4da7 | ||
|
|
00fe0b7e4d | ||
|
|
38772276a6 | ||
|
|
a980dba152 | ||
|
|
7bb6b1b7d5 | ||
|
|
985a39cb05 | ||
|
|
011112e362 | ||
|
|
fe73634e36 | ||
|
|
bd18fb8337 | ||
|
|
7f7693b836 | ||
|
|
be951a1c42 | ||
|
|
37c8d08d56 | ||
|
|
e83c4109ac | ||
|
|
0746b4b33d | ||
|
|
355802e65d | ||
|
|
9f6c19d9bd |
60
.github/workflows/build-image-on-push.yml
vendored
Normal file
60
.github/workflows/build-image-on-push.yml
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
name: "Test build of image when Dockerfile is changed"
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'Dockerfile'
|
||||
branches-ignore:
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- 'Dockerfile'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
GHCR_REPO: ghcr.io/${{ github.repository_owner }}/p2pool
|
||||
|
||||
jobs:
|
||||
rebuild-container:
|
||||
name: "Build image with cache"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Prepare platform matrix for arm64
|
||||
if: runner.arch == 'ARM64'
|
||||
run: |
|
||||
echo "PLATFORM=linux/arm64" >> $GITHUB_ENV
|
||||
echo "DIGEST_NAME=arm64" >> $GITHUB_ENV
|
||||
- name: Prepare platform matrix for amd64
|
||||
if: runner.arch == 'X64'
|
||||
run: |
|
||||
echo "PLATFORM=linux/amd64" >> $GITHUB_ENV
|
||||
echo "DIGEST_NAME=amd64" >> $GITHUB_ENV
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3.11.1
|
||||
-
|
||||
name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
-
|
||||
name: Test build of image
|
||||
id: build
|
||||
uses: docker/build-push-action@v6.18.0
|
||||
with:
|
||||
push: false
|
||||
load: true
|
||||
platforms: ${{ env.PLATFORM }}
|
||||
tags: p2pool:testing
|
||||
cache-from: type=registry,ref=${{ env.GHCR_REPO }}:latest
|
||||
-
|
||||
name: Test-run image
|
||||
run: |
|
||||
docker run --rm p2pool:testing --wallet 468ydghFfthE3UTc53eF5MP9UyrMcUiAHP5kizVYJsej5XGaXBoAAEzUHCcUF7t3E3RrYAX8Rs1ujhBdcvMpZSbH8qkb55R &
|
||||
PID=$!
|
||||
sleep 30
|
||||
kill -SIGINT $PID # this will return a non-zero exit code if the container dies early on
|
||||
37
.github/workflows/trivy-analysis.yml
vendored
37
.github/workflows/trivy-analysis.yml
vendored
@@ -1,37 +0,0 @@
|
||||
name: Build and scan container for vulnerabilities with Trivy
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'Dockerfile'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'Dockerfile'
|
||||
schedule:
|
||||
- cron: '22 14 * * 0'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build an image from Dockerfile
|
||||
run: |
|
||||
docker build -t docker.io/my-organization/my-app:${{ github.sha }} .
|
||||
|
||||
- name: Run Trivy vulnerability scanner
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
image-ref: 'docker.io/my-organization/my-app:${{ github.sha }}'
|
||||
format: 'template'
|
||||
template: '@/contrib/sarif.tpl'
|
||||
output: 'trivy-results.sarif'
|
||||
severity: 'CRITICAL,HIGH'
|
||||
|
||||
- name: Upload Trivy scan results to GitHub Security tab
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
with:
|
||||
sarif_file: 'trivy-results.sarif'
|
||||
142
.github/workflows/update-image-on-push.yml
vendored
142
.github/workflows/update-image-on-push.yml
vendored
@@ -6,58 +6,120 @@ on:
|
||||
- main
|
||||
paths:
|
||||
- 'Dockerfile'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
GHCR_REPO: ghcr.io/${{ github.repository_owner }}/p2pool
|
||||
|
||||
jobs:
|
||||
rebuild-container:
|
||||
name: "Rebuild Container with the latest base image"
|
||||
runs-on: ubuntu-latest
|
||||
build:
|
||||
name: "Build container for multiple architectures and push by digest"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
-
|
||||
name: Prepare outputs
|
||||
id: prep
|
||||
- name: Prepare platform matrix for arm64
|
||||
if: runner.arch == 'ARM64'
|
||||
run: |
|
||||
echo "::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3.2.0
|
||||
echo "PLATFORM=linux/arm64" >> $GITHUB_ENV
|
||||
echo "DIGEST_NAME=arm64" >> $GITHUB_ENV
|
||||
- name: Prepare platform matrix for amd64
|
||||
if: runner.arch == 'X64'
|
||||
run: |
|
||||
echo "PLATFORM=linux/amd64" >> $GITHUB_ENV
|
||||
echo "DIGEST_NAME=amd64" >> $GITHUB_ENV
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
platforms: linux/arm64
|
||||
-
|
||||
images: |
|
||||
${{ env.GHCR_REPO }}
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3.7.1
|
||||
uses: docker/setup-buildx-action@v3.11.1
|
||||
-
|
||||
name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3.3.0
|
||||
uses: docker/login-action@v3.6.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v3.3.0
|
||||
name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
-
|
||||
name: Build and and push by digest
|
||||
uses: docker/build-push-action@v6.18.0
|
||||
id: build
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: "Checkout repository"
|
||||
uses: "actions/checkout@v4"
|
||||
-
|
||||
name: "Get p2pool Release Tag"
|
||||
id: get_tag
|
||||
run: echo "::set-output name=tag::$(awk -F "=" '/P2POOL_BRANCH=/ {print $2}' Dockerfile)"
|
||||
-
|
||||
name: Build and push to Docker Hub and GitHub Packages Docker Registry
|
||||
uses: docker/build-push-action@v6.9.0
|
||||
id: docker_build_push
|
||||
outputs: type=image,"name=${{ env.GHCR_REPO }}",push-by-digest=true,name-canonical=true,push=true
|
||||
platforms: ${{ env.PLATFORM }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=registry,ref=${{ env.GHCR_REPO }}:latest
|
||||
|
||||
- name: Export digest
|
||||
run: |
|
||||
mkdir -p ${{ runner.temp }}/digests
|
||||
digest="${{ steps.build.outputs.digest }}"
|
||||
touch "${{ runner.temp }}/digests/${digest#sha256:}"
|
||||
|
||||
- name: Upload digest
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
name: digests-${{ env.DIGEST_NAME }}
|
||||
path: ${{ runner.temp }}/digests/*
|
||||
if-no-files-found: error
|
||||
retention-days: 1
|
||||
|
||||
merge:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build
|
||||
steps:
|
||||
- name: Download digests
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
path: ${{ runner.temp }}/digests
|
||||
pattern: digests-*
|
||||
merge-multiple: true
|
||||
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@v3.6.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3.11.1
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Get p2pool release tag
|
||||
run: echo P2POOL_TAG="$(awk -F '=' '/P2POOL_BRANCH=/ {print $2}' Dockerfile)" >> $GITHUB_ENV
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
${{ env.GHCR_REPO }}
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository_owner }}/p2pool:latest
|
||||
ghcr.io/${{ github.repository_owner }}/p2pool:${{ steps.get_tag.outputs.tag }}
|
||||
${{ secrets.DOCKER_USERNAME }}/p2pool:latest
|
||||
${{ secrets.DOCKER_USERNAME }}/p2pool:${{ steps.get_tag.outputs.tag }}
|
||||
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-to: type=inline
|
||||
type=sha
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
type=raw,value=${{ env.P2POOL_TAG }}
|
||||
|
||||
- name: Create manifest list and push
|
||||
working-directory: ${{ runner.temp }}/digests
|
||||
run: |
|
||||
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||
$(printf '${{ env.GHCR_REPO }}@sha256:%s ' *)
|
||||
|
||||
- name: Inspect image
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ env.GHCR_REPO }}:${{ steps.meta.outputs.version }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ARG P2POOL_BRANCH=v4.2
|
||||
ARG P2POOL_BRANCH=v4.12
|
||||
|
||||
# Select latest Ubuntu LTS for the build image base
|
||||
FROM ubuntu:latest as build
|
||||
|
||||
14
README.md
14
README.md
@@ -5,19 +5,9 @@ A simple and straightforward Dockerized [p2pool](https://github.com/SChernykh/p2
|
||||
|
||||
[](https://github.com/sethsimmons/p2pool-docker/actions/workflows/update-daily.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/p2pool
|
||||
This repo is used to build the images available here on GHCR.
|
||||
|
||||
# Tags
|
||||
|
||||
@@ -28,7 +18,7 @@ https://hub.docker.com/r/sethsimmons/p2pool
|
||||
*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
|
||||
docker run -d --name="p2pool" -p 3333:3333 -p 37889:37889 -v p2pool-data:/home/p2pool -v /dev/hugepages:/dev/hugepages:rw ghcr.io/sethforprivacy/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
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
version: '3.5'
|
||||
services:
|
||||
monerod:
|
||||
image: sethsimmons/simple-monerod:latest
|
||||
image: ghcr.io/sethforprivacy/simple-monerod:latest
|
||||
restart: unless-stopped
|
||||
container_name: monerod
|
||||
volumes:
|
||||
@@ -21,7 +20,7 @@ services:
|
||||
- "--out-peers=50"
|
||||
|
||||
p2pool:
|
||||
image: sethsimmons/p2pool:latest
|
||||
image: ghcr.io/sethforprivacy/p2pool:latest
|
||||
restart: unless-stopped
|
||||
container_name: p2pool
|
||||
tty: true
|
||||
@@ -52,15 +51,6 @@ services:
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user