mirror of
https://github.com/sethforprivacy/p2pool-docker.git
synced 2026-06-23 12:22:36 -04:00
Compare commits
113 Commits
355802e65d
...
ci-harden-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
699b578ee7 | ||
|
|
46d68375cd | ||
|
|
1bb3947f60 | ||
|
|
df326bcf85 | ||
|
|
f0f9059dd6 | ||
|
|
93b13c156d | ||
|
|
5b7ab876bf | ||
|
|
7e7cab924e | ||
|
|
c0187089f4 | ||
|
|
6f18143ef1 | ||
|
|
81b47a06b7 | ||
|
|
a36f7e0a2f | ||
|
|
0518013758 | ||
|
|
24185da98c | ||
|
|
a0610a6215 | ||
|
|
f8867c29bb | ||
|
|
6b67d40ec2 | ||
|
|
3d1374df75 | ||
|
|
599c70f413 | ||
|
|
9303676316 | ||
|
|
c20c54e17d | ||
|
|
b3dca32ba0 | ||
|
|
f96e9166dc | ||
|
|
1ec1d51cfb | ||
|
|
d2bed819bd | ||
|
|
ea2462edf8 | ||
|
|
d30e72c868 | ||
|
|
943566c666 | ||
|
|
2afef48805 | ||
|
|
9c9a34f0d3 | ||
|
|
bd412b57f5 | ||
|
|
46a1067577 | ||
|
|
fd9cf843cf | ||
|
|
e883973c01 | ||
|
|
fa13d52fdb | ||
|
|
de5a18086b | ||
|
|
99e34b3579 | ||
|
|
21da5b959b | ||
|
|
f2476cbaaa | ||
|
|
bf406b66a8 | ||
|
|
cc76d47cc4 | ||
|
|
276ec16292 | ||
|
|
366802894c | ||
|
|
9fdc25b6b6 | ||
|
|
868cfb9673 | ||
|
|
6ebfedde92 | ||
|
|
6d4f11403b | ||
|
|
b82007d36e | ||
|
|
8522817c89 | ||
|
|
8a2d4bd270 | ||
|
|
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 |
11
.github/dependabot.yml
vendored
11
.github/dependabot.yml
vendored
@@ -1,11 +0,0 @@
|
|||||||
version: 2
|
|
||||||
updates:
|
|
||||||
# Maintain dependencies for GitHub Actions
|
|
||||||
- package-ecosystem: "github-actions"
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: "daily"
|
|
||||||
groups:
|
|
||||||
dependency-updates:
|
|
||||||
patterns:
|
|
||||||
- "*"
|
|
||||||
24
.github/renovate.json
vendored
Normal file
24
.github/renovate.json
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"config:recommended",
|
||||||
|
"docker:enableMajor",
|
||||||
|
"mergeConfidence:all-badges",
|
||||||
|
":disableRateLimiting",
|
||||||
|
":semanticCommits"
|
||||||
|
],
|
||||||
|
"rebaseWhen": "conflicted",
|
||||||
|
"customManagers": [
|
||||||
|
{
|
||||||
|
"customType": "regex",
|
||||||
|
"managerFilePatterns": [
|
||||||
|
"/(^|/)Dockerfile$/"
|
||||||
|
],
|
||||||
|
"matchStrings": [
|
||||||
|
"# renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\sARG .*?_VERSION=(?<currentValue>.*)(\\sARG .*?_CHECKSUM=(?<currentDigest>.*))?\\s",
|
||||||
|
"# renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\sARG .*?_BRANCH=(?<currentValue>.*)(\\sARG .*?_COMMIT_HASH=(?<currentDigest>.*))?\\s"
|
||||||
|
],
|
||||||
|
"versioningTemplate": "{{#if versioning}}{{versioning}}{{/if}}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
86
.github/workflows/build-image-on-push.yml
vendored
Normal file
86
.github/workflows/build-image-on-push.yml
vendored
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
name: "Test build of image when Dockerfile is changed"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'Dockerfile'
|
||||||
|
branches-ignore:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'Dockerfile'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
# Least-privilege default token (this workflow only reads the repo and pulls cache)
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
# Cancel superseded runs for the same ref to save CI minutes
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
GHCR_REPO: ghcr.io/${{ github.repository_owner }}/p2pool
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
rebuild-container:
|
||||||
|
name: "Build image with cache"
|
||||||
|
timeout-minutes: 60
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: read
|
||||||
|
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@v4.1.0
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Test build of image
|
||||||
|
id: build
|
||||||
|
uses: docker/build-push-action@v7.2.0
|
||||||
|
with:
|
||||||
|
push: false
|
||||||
|
load: true
|
||||||
|
platforms: ${{ env.PLATFORM }}
|
||||||
|
tags: p2pool:testing
|
||||||
|
cache-from: |
|
||||||
|
type=registry,ref=${{ env.GHCR_REPO }}:buildcache-${{ env.DIGEST_NAME }}
|
||||||
|
type=registry,ref=${{ env.GHCR_REPO }}:latest
|
||||||
|
- name: Verify reported version matches the pinned p2pool tag
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
EXPECTED="$(awk -F= '/^ARG P2POOL_BRANCH=/{print $2; exit}' Dockerfile)"
|
||||||
|
echo "Expecting p2pool to report: ${EXPECTED}"
|
||||||
|
OUT="$(docker run --rm p2pool:testing --help 2>&1 || true)"
|
||||||
|
echo "${OUT}" | head -1
|
||||||
|
echo "${OUT}" | grep -q "${EXPECTED}" \
|
||||||
|
|| { echo "::error::p2pool banner does not contain expected tag ${EXPECTED}"; exit 1; }
|
||||||
|
- name: Verify the container starts and stays up
|
||||||
|
run: |
|
||||||
|
set -uo pipefail
|
||||||
|
CID="$(docker run -d p2pool:testing --wallet 468ydghFfthE3UTc53eF5MP9UyrMcUiAHP5kizVYJsej5XGaXBoAAEzUHCcUF7t3E3RrYAX8Rs1ujhBdcvMpZSbH8qkb55R)"
|
||||||
|
sleep 20
|
||||||
|
if [ "$(docker inspect -f '{{.State.Running}}' "$CID" 2>/dev/null || echo false)" != "true" ]; then
|
||||||
|
echo "::error::container exited early"; docker logs "$CID" 2>&1 || true
|
||||||
|
docker rm -f "$CID" >/dev/null 2>&1 || true; exit 1
|
||||||
|
fi
|
||||||
|
docker rm -f "$CID" >/dev/null 2>&1 || true
|
||||||
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'
|
|
||||||
196
.github/workflows/update-image-on-push.yml
vendored
196
.github/workflows/update-image-on-push.yml
vendored
@@ -6,58 +6,166 @@ on:
|
|||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- 'Dockerfile'
|
- 'Dockerfile'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
# Least-privilege default; jobs that push opt into packages: write below
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
# Never run two prod pushes for the same ref concurrently (avoid racing the
|
||||||
|
# manifest/`latest` tag); do not cancel an in-flight push.
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
env:
|
||||||
|
GHCR_REPO: ghcr.io/${{ github.repository_owner }}/p2pool
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
rebuild-container:
|
build:
|
||||||
name: "Rebuild Container with the latest base image"
|
name: "Build container for multiple architectures and push by digest"
|
||||||
runs-on: ubuntu-latest
|
timeout-minutes: 60
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-latest
|
||||||
|
- ubuntu-24.04-arm
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Prepare platform matrix for arm64
|
||||||
name: Prepare outputs
|
if: runner.arch == 'ARM64'
|
||||||
id: prep
|
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
|
echo "PLATFORM=linux/arm64" >> $GITHUB_ENV
|
||||||
-
|
echo "DIGEST_NAME=arm64" >> $GITHUB_ENV
|
||||||
name: Set up QEMU
|
- name: Prepare platform matrix for amd64
|
||||||
uses: docker/setup-qemu-action@v3.2.0
|
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@v6
|
||||||
with:
|
with:
|
||||||
platforms: linux/arm64
|
images: |
|
||||||
-
|
${{ env.GHCR_REPO }}
|
||||||
name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3.7.1
|
uses: docker/setup-buildx-action@v4.1.0
|
||||||
-
|
- name: Login to GitHub Container Registry
|
||||||
name: Login to GitHub Container Registry
|
uses: docker/login-action@v4.2.0
|
||||||
uses: docker/login-action@v3.3.0
|
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
-
|
- name: Checkout repository
|
||||||
name: Login to DockerHub
|
uses: actions/checkout@v7
|
||||||
uses: docker/login-action@v3.3.0
|
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
persist-credentials: false
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
- name: Build and push by digest
|
||||||
- name: "Checkout repository"
|
uses: docker/build-push-action@v7.2.0
|
||||||
uses: "actions/checkout@v4"
|
id: build
|
||||||
-
|
|
||||||
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.10.0
|
|
||||||
id: docker_build_push
|
|
||||||
with:
|
with:
|
||||||
push: true
|
outputs: type=image,"name=${{ env.GHCR_REPO }}",push-by-digest=true,name-canonical=true,push=true
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: ${{ env.PLATFORM }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
cache-from: |
|
||||||
|
type=registry,ref=${{ env.GHCR_REPO }}:buildcache-${{ env.DIGEST_NAME }}
|
||||||
|
type=registry,ref=${{ env.GHCR_REPO }}:latest
|
||||||
|
cache-to: type=registry,ref=${{ env.GHCR_REPO }}:buildcache-${{ env.DIGEST_NAME }},mode=max
|
||||||
|
|
||||||
|
# Smoke-test the exact artifact that was just pushed, BEFORE the merge job
|
||||||
|
# tags it `latest`. If this fails, the merge job (needs: build) never runs.
|
||||||
|
- name: Verify pushed image reports the pinned p2pool tag
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
EXPECTED="$(awk -F= '/^ARG P2POOL_BRANCH=/{print $2; exit}' Dockerfile)"
|
||||||
|
REF="${GHCR_REPO}@${{ steps.build.outputs.digest }}"
|
||||||
|
echo "Expecting ${EXPECTED} from ${REF}"
|
||||||
|
OUT="$(docker run --rm "${REF}" --help 2>&1 || true)"
|
||||||
|
echo "${OUT}" | head -1
|
||||||
|
echo "${OUT}" | grep -q "${EXPECTED}" \
|
||||||
|
|| { echo "::error::pushed image banner does not contain expected tag ${EXPECTED}"; exit 1; }
|
||||||
|
- name: Verify pushed image starts and stays up
|
||||||
|
run: |
|
||||||
|
set -uo pipefail
|
||||||
|
REF="${GHCR_REPO}@${{ steps.build.outputs.digest }}"
|
||||||
|
CID="$(docker run -d "${REF}" --wallet 468ydghFfthE3UTc53eF5MP9UyrMcUiAHP5kizVYJsej5XGaXBoAAEzUHCcUF7t3E3RrYAX8Rs1ujhBdcvMpZSbH8qkb55R)"
|
||||||
|
sleep 20
|
||||||
|
if [ "$(docker inspect -f '{{.State.Running}}' "$CID" 2>/dev/null || echo false)" != "true" ]; then
|
||||||
|
echo "::error::pushed image exited early"; docker logs "$CID" 2>&1 || true
|
||||||
|
docker rm -f "$CID" >/dev/null 2>&1 || true; exit 1
|
||||||
|
fi
|
||||||
|
docker rm -f "$CID" >/dev/null 2>&1 || true
|
||||||
|
|
||||||
|
- 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@v7
|
||||||
|
with:
|
||||||
|
name: digests-${{ env.DIGEST_NAME }}
|
||||||
|
path: ${{ runner.temp }}/digests/*
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
merge:
|
||||||
|
name: "Merge digests and push with proper tags"
|
||||||
|
timeout-minutes: 15
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- build
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
steps:
|
||||||
|
- name: Download digests
|
||||||
|
uses: actions/download-artifact@v8
|
||||||
|
with:
|
||||||
|
path: ${{ runner.temp }}/digests
|
||||||
|
pattern: digests-*
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
|
- name: Login to GHCR
|
||||||
|
uses: docker/login-action@v4.2.0
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v4.1.0
|
||||||
|
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- 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@v6
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
${{ env.GHCR_REPO }}
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ github.repository_owner }}/p2pool:latest
|
type=sha
|
||||||
ghcr.io/${{ github.repository_owner }}/p2pool:${{ steps.get_tag.outputs.tag }}
|
type=raw,value=latest,enable={{is_default_branch}}
|
||||||
${{ secrets.DOCKER_USERNAME }}/p2pool:latest
|
type=raw,value=${{ env.P2POOL_TAG }}
|
||||||
${{ secrets.DOCKER_USERNAME }}/p2pool:${{ steps.get_tag.outputs.tag }}
|
|
||||||
labels: |
|
- name: Create manifest list and push
|
||||||
org.opencontainers.image.source=${{ github.event.repository.html_url }}
|
working-directory: ${{ runner.temp }}/digests
|
||||||
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
|
run: |
|
||||||
org.opencontainers.image.revision=${{ github.sha }}
|
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||||
cache-from: type=registry,ref=${{ secrets.DOCKER_USERNAME }}/simple-monerod:latest
|
$(printf '${{ env.GHCR_REPO }}@sha256:%s ' *)
|
||||||
cache-to: type=inline
|
|
||||||
|
- name: Inspect image
|
||||||
|
run: |
|
||||||
|
docker buildx imagetools inspect ${{ env.GHCR_REPO }}:${{ steps.meta.outputs.version }}
|
||||||
|
|||||||
25
Dockerfile
25
Dockerfile
@@ -1,7 +1,8 @@
|
|||||||
ARG P2POOL_BRANCH=v4.2
|
# renovate: datasource=github-releases depName=SChernykh/p2pool
|
||||||
|
ARG P2POOL_BRANCH=v4.17
|
||||||
|
|
||||||
# Select latest Ubuntu LTS for the build image base
|
# Pin to the latest Ubuntu LTS for the build image base (kept current by Renovate)
|
||||||
FROM ubuntu:latest as build
|
FROM ubuntu:26.04 AS build
|
||||||
LABEL author="sethforprivacy@protonmail.com" \
|
LABEL author="sethforprivacy@protonmail.com" \
|
||||||
maintainer="sethforprivacy@protonmail.com"
|
maintainer="sethforprivacy@protonmail.com"
|
||||||
|
|
||||||
@@ -16,28 +17,30 @@ RUN apt-get update \
|
|||||||
|
|
||||||
ENV CFLAGS='-fPIC'
|
ENV CFLAGS='-fPIC'
|
||||||
ENV CXXFLAGS='-fPIC'
|
ENV CXXFLAGS='-fPIC'
|
||||||
ENV USE_SINGLE_BUILDDIR 1
|
ENV USE_SINGLE_BUILDDIR=1
|
||||||
ENV BOOST_DEBUG 1
|
ENV BOOST_DEBUG=1
|
||||||
|
|
||||||
# Switch to p2pool source directory
|
# Switch to p2pool source directory
|
||||||
WORKDIR /p2pool
|
WORKDIR /p2pool
|
||||||
|
|
||||||
# Git pull p2pool source at specified tag/branch
|
# Git pull p2pool source at specified tag/branch
|
||||||
ARG P2POOL_BRANCH
|
ARG P2POOL_BRANCH
|
||||||
RUN git clone --recursive --branch ${P2POOL_BRANCH} https://github.com/SChernykh/p2pool .
|
RUN git clone --recursive --depth 1 --shallow-submodules --branch ${P2POOL_BRANCH} https://github.com/SChernykh/p2pool .
|
||||||
|
|
||||||
# Make static p2pool binary
|
# Make static p2pool binary
|
||||||
ARG NPROC
|
ARG NPROC
|
||||||
RUN test -z "$NPROC" && nproc > /nproc || echo -n "$NPROC" > /nproc && mkdir build && cd build && cmake .. && make -j"$(cat /nproc)"
|
RUN test -z "$NPROC" && nproc > /nproc || echo -n "$NPROC" > /nproc && mkdir build && cd build && cmake .. && make -j"$(cat /nproc)"
|
||||||
|
|
||||||
# Select latest Ubuntu LTS for the image base
|
# Pin to the latest Ubuntu LTS for the image base (kept current by Renovate)
|
||||||
FROM ubuntu:latest
|
FROM ubuntu:26.04
|
||||||
|
|
||||||
# Install remaining dependencies
|
# Install only the runtime shared libraries that the p2pool binary links against
|
||||||
|
# (runtime equivalents of the build-stage -dev packages, verified via ldd on the
|
||||||
|
# built binary against the pinned Ubuntu 24.04 base)
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get upgrade -y \
|
&& apt-get upgrade -y \
|
||||||
&& apt-get install --no-install-recommends -y libuv1-dev libzmq3-dev libsodium-dev \
|
&& apt-get install --no-install-recommends -y libuv1t64 libzmq5 libsodium23 \
|
||||||
libpgm-dev libnorm-dev libgss-dev libcurl4-openssl-dev libidn2-0-dev \
|
libpgm-5.3-0t64 libnorm1t64 libgssapi-krb5-2 libcurl4t64 libidn2-0 \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2021 Seth Simmons (@sethsimmons)
|
Copyright (c) 2021 Seth For Privacy (@sethforprivacy)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
18
README.md
18
README.md
@@ -3,21 +3,11 @@ A simple and straightforward Dockerized [p2pool](https://github.com/SChernykh/p2
|
|||||||
|
|
||||||
## Actions
|
## Actions
|
||||||
|
|
||||||
[](https://github.com/sethsimmons/p2pool-docker/actions/workflows/update-daily.yml)
|
[](https://github.com/sethforprivacy/p2pool-docker/actions/workflows/update-daily.yml)
|
||||||
[](https://github.com/sethsimmons/p2pool-docker/actions/workflows/update-base-image.yml)
|
[](https://github.com/sethforprivacy/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
|
# Docker Hub
|
||||||
This repo is used to build the images available at:
|
This repo is used to build the images available here on GHCR.
|
||||||
|
|
||||||
https://hub.docker.com/r/sethsimmons/p2pool
|
|
||||||
|
|
||||||
# Tags
|
# 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.*
|
*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
|
```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
|
# Copyrights
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
version: '3.5'
|
|
||||||
services:
|
services:
|
||||||
monerod:
|
monerod:
|
||||||
image: sethsimmons/simple-monerod:latest
|
image: ghcr.io/sethforprivacy/simple-monerod:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
container_name: monerod
|
container_name: monerod
|
||||||
volumes:
|
volumes:
|
||||||
@@ -21,7 +20,7 @@ services:
|
|||||||
- "--out-peers=50"
|
- "--out-peers=50"
|
||||||
|
|
||||||
p2pool:
|
p2pool:
|
||||||
image: sethsimmons/p2pool:latest
|
image: ghcr.io/sethforprivacy/p2pool:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
container_name: p2pool
|
container_name: p2pool
|
||||||
tty: true
|
tty: true
|
||||||
@@ -52,15 +51,6 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- tor-keys:/var/lib/tor/hidden_service/
|
- 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:
|
watchtower:
|
||||||
image: containrrr/watchtower:latest
|
image: containrrr/watchtower:latest
|
||||||
container_name: watchtower
|
container_name: watchtower
|
||||||
|
|||||||
Reference in New Issue
Block a user