mirror of
https://github.com/metal3d/docker-xmrig.git
synced 2024-09-11 13:15:29 +03:00
Update to 5.1.0 + more options
- build on recent alpine + 5.1.0 xmrig version - see issue #1 - added COIN and ALGO env vars
This commit is contained in:
parent
2877d6e18d
commit
2e47874f51
@ -2,7 +2,7 @@ FROM alpine
|
||||
|
||||
LABEL maintainer="Patrice Ferlet <metal3d@gmail.com>"
|
||||
|
||||
ARG VERSION=3.2.0
|
||||
ARG VERSION=5.1.0
|
||||
|
||||
RUN set -xe;\
|
||||
echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories; \
|
||||
|
4
Makefile
4
Makefile
@ -1,5 +1,5 @@
|
||||
VERSION = 3.2.0
|
||||
REL = $(VERSION)-3
|
||||
VERSION = 5.1.0
|
||||
REL = $(VERSION)-1
|
||||
THREADS = $(shell nproc)
|
||||
PRIORITY = 0
|
||||
REPO=metal3d/xmrig
|
||||
|
@ -73,5 +73,7 @@ Complete list of supported environment variable:
|
||||
- `PRIORITY`: CPU priority. 0=idle, 1=normal, 2 to 5 for higher priority
|
||||
- `THREADS`: number of thread to start, default to number CPU / 2
|
||||
- `ACCESS_TOKEN`: Bearer access token to access to xmrig API (served on 3000 port), default is a generated token (uuid)
|
||||
- `ALGO`: mining algorithm https://xmrig.com/docs/algorithms (default is empty)
|
||||
- `COIN`: that is the coin option instead of algorithm (default is empty)
|
||||
|
||||
|
||||
|
@ -60,9 +60,22 @@ if [ "$PRIORITY" -ge 0 ] && [ "$PRIORITY" -le 5 ]; then
|
||||
CPU_PRIORITY=$PRIORITY
|
||||
fi
|
||||
|
||||
# for others parameters
|
||||
OTHERS_OPTS=""
|
||||
if [ "$COIN" != "" ]; then
|
||||
OTHERS_OPTS=$OTHERS_OPTS" --coin=$COIN"
|
||||
fi
|
||||
|
||||
if [ "$ALGO" != "" ]; then
|
||||
OTHERS_OPTS=$OTHERS_OPTS" --algo=$ALGO"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
exec xmrig --user=${POOL_USER} --url=${POOL_URL} ${PASS_OPTS} ${THREAD_OPTS} \
|
||||
--cpu-priority=${CPU_PRIORITY} \
|
||||
--donate-level=$DONATE_LEVEL \
|
||||
--http-port=3000 --http-host=0.0.0.0 --http-enabled \
|
||||
--http-access-token=${ACCESS_TOKEN}
|
||||
--http-access-token=${ACCESS_TOKEN} \
|
||||
${OTHERS_OPTS}
|
||||
|
Loading…
Reference in New Issue
Block a user