https://github.com/lanjelin/p2pool-zero
A rootless, distroless, from-scratch Docker image for running p2pool.
https://github.com/lanjelin/p2pool-zero
Last synced: about 2 months ago
JSON representation
A rootless, distroless, from-scratch Docker image for running p2pool.
- Host: GitHub
- URL: https://github.com/lanjelin/p2pool-zero
- Owner: Lanjelin
- Created: 2025-08-01T05:37:21.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-08-04T11:50:20.000Z (2 months ago)
- Last Synced: 2025-08-15T16:13:35.163Z (about 2 months ago)
- Language: Dockerfile
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: .github/README.md
Awesome Lists containing this project
README
# p2pool-zero
A secure, zero-footprint Docker image for running [P2Pool](https://github.com/SChernykh/p2pool) โ fully rootless, distroless, and built entirely `FROM scratch` for maximum isolation and minimal attack surface.
Hosted image:
๐ฆ [`ghcr.io/lanjelin/p2pool-zero`](https://ghcr.io/lanjelin/p2pool-zero)---
## ๐ Security-First Design
This image is built with a focus on container hardening:
* **Built from scratch** โ no shell, no package manager, no OS files.
* **Fully static binary** โ verified P2Pool release from upstream.
* **Runs as non-root** โ `USER 1000:1000` by default.
* Explicitly mounted volumes required for persistence.
* Extremely compact โ minimal attack surface, fast startup.---
## ๐งฑ What's Inside?
* โ [`p2pool`](https://github.com/SChernykh/p2pool) `v4.9`
* Official precompiled binary verified via GPG and SHA256
* No shell, no libc, no package manager
* โ System CA certificates (for HTTPS peer fetching)---
## ๐ Usage
> ๐ง You can override the container user with `--user` if needed to match mounted volume ownership.
Create a local data folder:
```bash
mkdir -p p2pool-data
```Run the container:
```bash
docker run --rm -it \
-v "$(pwd)/p2pool-data:/data" \
-p 3333:3333 \
-p 37889:37889 \
ghcr.io/lanjelin/p2pool-zero \
--host "192.168.0.55" \
--rpc-port "18089" \
--zmq-port "18083" \
--wallet "44...YOUR_MONERO_ADDRESS...abc" \
--stratum "0.0.0.0:3333" \
--p2p "0.0.0.0:37889" \
--data-dir "/data"
```This setup:
* Uses your Monero node via `--host` and `--rpc-port`
* Opens standard stratum (3333) and p2p (37889) ports
* Stores peer cache and stats in `./p2pool-data`> ๐ก Replace `--wallet` with your own Monero address or it will default to donating hash rate.
---
## ๐งฉ Docker Compose
You can also run it with Compose:
```yaml
services:
p2pool:
image: ghcr.io/lanjelin/p2pool-zero
user: "1000:1000"
tty: true
stdin_open: true
volumes:
- ./p2pool-data:/data
ports:
- "3333:3333"
- "37889:37889"
command: >
--host "192.168.0.55"
--rpc-port "18089"
--zmq-port "18083"
--wallet "44...YOUR_MONERO_ADDRESS...abc"
--stratum "0.0.0.0:3333"
--p2p "0.0.0.0:37889"
--data-dir "/data"
```To launch:
```bash
docker-compose up
```---
## ๐ Volumes
This image requires manual volume mounting โ there are no internal writable paths.
### Required:
* `/data` โ peer info, stratum cache, stats, etc.
Ensure the mounted `./p2pool-data` folder is writable by UID `1000`.
---
## ๐ ๏ธ Build Info
This image is built in **2 stages**:
1. **Builder stage (Debian)**
* Downloads official P2Pool binary and signature
* Verifies PGP signature and SHA256 hash
* Extracts binary and CA certificates2. **Final `scratch` stage**
* Copies only `/bin/p2pool` and CA bundle
* Declares `USER 1000:1000` and entrypointNo shell, no package manager, no unused files.
---
## ๐งช Building the Image Locally
```bash
git clone https://github.com/Lanjelin/p2pool-zero.git
cd p2pool-zero
docker build -t p2pool-zero .
```> ๐ GPG key for `SChernykh` is fetched from `keyserver.ubuntu.com` and verified before extracting the release.
---
## ๐ How to Mine
Follow the official mining guide here:
๐ [How to mine on P2Pool](https://github.com/SChernykh/p2pool#how-to-mine-on-p2pool)---
## ๐ License
P2Pool is licensed under GPL-3.
This Docker image does not modify the binary and complies with upstream licensing.---
## ๐ค Maintainer
**Lanjelin**
Image hosted at [ghcr.io/lanjelin/p2pool-zero](https://ghcr.io/lanjelin/p2pool-zero)---