通过docker进行一键xmr挖矿

Tags:

参考

https://github.com/snowdream/docker-xmr/blob/master/config.json

config文件

{
    "api": {
        "id": null,
        "worker-id": null
    },
    "http": {
        "enabled": false,
        "host": "127.0.0.1",
        "port": 0,
        "access-token": null,
        "restricted": true
    },
    "autosave": true,
    "rebench-algo": false,
    "bench-algo-time": 10,
    "background": false,
    "colors": true,
    "randomx": {
        "init": -1,
        "mode": "auto",
        "1gb-pages": false,
        "rdmsr": true,
        "wrmsr": true,
        "numa": true
    },
    "cpu": {
        "enabled": true,
        "huge-pages": true,
        "hw-aes": null,
        "priority": null,
        "memory-pool": false,
        "yield": true,
        "max-threads-hint": 100,
        "asm": true,
        "argon2-impl": null,
        "cn/0": false,
        "cn-lite/0": false
    },
    "donate-level": 0,
    "opencl": {
        "enabled": false,
        "cache": true,
        "loader": null,
        "platform": "AMD",
        "cn/0": false,
        "cn-lite/0": false
    },
    "cuda": {
        "enabled": false,
        "loader": null,
        "nvml": true,
        "cn/0": false,
        "cn-lite/0": false
    },
    "donate-level": 0,
    "donate-over-proxy": 0,
    "log-file": null,
    "pools": [
        {
            "algo": null,
            "coin": null,
"url": "sg.minexmr.com:4444",
"user": "49LtY9iWMS6C3SgSFrgcpRe7Z8wgPZYRDZDCU7VnngpeJqPWanpJy6NK46FKva1Qd4KeAombFMiH47FZXZ2Yj4dASZXvQiL",
"pass": "online3o",
            "rig-id": null,
            "nicehash": false,
            "keepalive": false,
            "enabled": true,
            "tls": false,
            "tls-fingerprint": null,
            "daemon": false,
            "self-select": null
        }
    ],
    "print-time": 60,
    "health-print-time": 60,
    "retries": 5,
    "retry-pause": 5,
    "syslog": false,
    "user-agent": null,
    "verbose": 0,
    "watch": true
}

一键起飞


mkdir -p /data/xmr; cd /data/xmr && \
wget -O config.json https://file.10244201.xyz/xmr_config.json && \
sed -i.bak "s/MACHINE_ID_PLACEHOLDER/$(hostname)/g" config.json

# 验证一下
grep $(hostname) config.json

# 默认CPU_USAGE就是90
docker stop xmr; docker rm xmr; \
docker run --restart=always --network host -d -v $(pwd)/config.json:/etc/xmrig/config.json -e CPU_USAGE=100 --name xmr snowdream/xmr && \
docker logs -f xmr

Leave a Reply