High performance, open source RandomX, CryptoNight, AstroBWT and Argon2 CPU/GPU miner Docker image.
This image is published to multiple registries.
docker run docker.io/cniweb/xmrig:latestdocker run ghcr.io/cniweb/xmrig:latestPackage link: https://github.com/cniweb/xmrig-monero/pkgs/container/xmrig
Dockerfilecurrently uses XMRig6.26.0.build.shcurrently tags/pushes6.26.0.Dockerfile.securecurrently uses XMRig6.26.0.
This repository includes a manual GitHub workflow to create a new release from a version input:
- Workflow:
.github/workflows/release-from-version.yml - Trigger: GitHub Actions ->
Create Release From Version->Run workflow - Input:
version(6.27.0orv6.27.0)
What it does:
- Updates version references in
Dockerfile,Dockerfile.secure,build.sh,README.md, andSECURITY.md - Creates a commit (
chore(release): vX.Y.Z) - Creates and pushes git tag
vX.Y.Z - Creates a GitHub release by reusing previous release title/body and replacing only the version/tag
For agent-driven release requests, use prompt file:
.github/prompts/create-release.prompt.md
Direct docker run uses:
- bundled
config.json(GhostRider defaults) - non-root user
xmrig - entrypoint
docker-entrypoint.sh
Example:
docker run --rm ghcr.io/cniweb/xmrig:latest --versionMSR and 1GB huge pages are not enabled automatically in this default non-root mode.
compose.yaml is a Linux-focused RandomX runtime profile that runs the published image with elevated runtime permissions and a startup helper script.
Usage:
cp .env.randomx.example .env
docker compose up -d xmrigMain files:
compose.yamlstart-linux-randomx.sh.env.randomx.exampleconfig.randomx.json(standalone RandomX config example)
Optional overrides:
compose.linux-msr.yamlcompose.linux-hugepages.yaml
Example with override:
docker compose -f compose.yaml -f compose.linux-hugepages.yaml up -d xmrigIf you run on a native Linux Azure VM (not ACI), prepare host settings first:
sudo modprobe msr
sudo modprobe msr allow_writes=on
sudo sysctl -w vm.nr_hugepages="$(nproc)"
for i in /sys/devices/system/node/node*; do
echo 3 | sudo tee "$i/hugepages/hugepages-1048576kB/nr_hugepages" >/dev/null
doneThen run:
docker run -d \
--name xmrig \
--restart unless-stopped \
--user root \
--privileged \
--cap-add=SYS_RAWIO \
--cap-add=IPC_LOCK \
--device=/dev/cpu:/dev/cpu \
--ulimit memlock=-1:-1 \
-p 8080:8080 \
-e XMRIG_MSR=1 \
-e XMRIG_HUGE_PAGES_JIT=1 \
-e XMRIG_RANDOMX_1GB_PAGES=1 \
-e ALGO=rx/0 \
-e POOL_ADDRESS='stratum+ssl://pool.supportxmr.com:443' \
-e WALLET_USER='YOUR_MONERO_WALLET.worker' \
-e PASSWORD='x' \
ghcr.io/cniweb/xmrig:latestCheck runtime status:
docker logs -f xmrigAzure Container Instances does not expose the host-level interfaces required for MSR and 1GB huge pages.
Typical ACI log messages:
msr kernel module is not availableFAILED TO APPLY MSR MOD, HASHRATE WILL BE LOW1GB PAGES disabled
For MSR and huge pages tuning, use a native Linux VM runtime.
HUGE PAGES supportedmeans binary support exists, not that allocation succeeded.- For real gains, XMRig should report high huge pages allocation (ideally near
100%). - On Docker Desktop with WSL2, MSR and 1GB huge pages are often constrained by virtualization.