mirror of
https://git.wownero.com/lza_menace/docker-wownero.git
synced 2024-08-15 01:03:31 +00:00
adding dir for mining
This commit is contained in:
parent
5924430a62
commit
3f506d843e
3 changed files with 61 additions and 0 deletions
16
mining/Dockerfile
Normal file
16
mining/Dockerfile
Normal file
|
@ -0,0 +1,16 @@
|
|||
FROM ubuntu:19.10
|
||||
|
||||
RUN \
|
||||
apt-get update \
|
||||
&& apt-get install -y git build-essential cmake libuv1-dev libssl-dev libhwloc-dev \
|
||||
&& git clone https://github.com/xmrig/xmrig.git /root/xmrig \
|
||||
&& mkdir /root/xmrig/build \
|
||||
&& cd /root/xmrig/build \
|
||||
&& cmake .. \
|
||||
&& make
|
||||
|
||||
COPY start_mining .
|
||||
|
||||
RUN chmod +x start_mining
|
||||
|
||||
ENTRYPOINT ["./start_mining"]
|
16
mining/README.md
Normal file
16
mining/README.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# Miner
|
||||
|
||||
This is a quick and dirty implementation. There's some hardcoded choices in there until I go back and update it or someone makes a PR.
|
||||
|
||||
```
|
||||
# build container image of xmrig (mining software)
|
||||
docker build -t miner .
|
||||
|
||||
# run simple wow miner
|
||||
docker run --rm -d --name miner miner <your wow address>
|
||||
|
||||
# run big monero miner
|
||||
docker run --rm -d --name miner miner <your xmr address> xmr 8
|
||||
```
|
||||
|
||||
See [start_mining](./start_mining) for details of inputs.
|
29
mining/start_mining
Normal file
29
mining/start_mining
Normal file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -xe
|
||||
|
||||
RECV_ADDR=${1}
|
||||
SYMBOL=${2:-wow}
|
||||
THREADS=${3:-2}
|
||||
|
||||
if [[ "${SYMBOL}" == "wow" ]]; then
|
||||
ALGO="rx/wow"
|
||||
CRYPTO="wownero"
|
||||
URL=ca.${CRYPTO}.herominers.com:10661
|
||||
ADDRESS=${RECV_ADDR}
|
||||
elif [[ "${SYMBOL}" == "xmr" ]]; then
|
||||
ALGO="rx/0"
|
||||
CRYPTO="monero"
|
||||
URL=pool.supportxmr.com:3333
|
||||
ADDRESS=${RECV_ADDR}
|
||||
fi
|
||||
|
||||
/root/xmrig/build/xmrig \
|
||||
--donate-level 1 \
|
||||
--url=${URL} \
|
||||
--user=${ADDRESS} \
|
||||
--pass=$HOSTNAME \
|
||||
--algo=${ALGO} \
|
||||
--keepalive \
|
||||
--print-time=10 \
|
||||
--threads=${THREADS}
|
Loading…
Reference in a new issue