-
Notifications
You must be signed in to change notification settings - Fork 35
/
Dockerfile
45 lines (34 loc) · 1.22 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM alpine:3.13 AS builder
ARG XMRIG_VERSION='v6.21.1'
WORKDIR /miner
RUN echo "@community http://dl-cdn.alpinelinux.org/alpine/v3.18/community" >> /etc/apk/repositories && \
apk update && apk add --no-cache \
build-base \
git \
cmake \
libuv-dev \
linux-headers \
libressl-dev \
hwloc-dev@community
RUN git clone https://github.com/xmrig/xmrig && \
mkdir xmrig/build && \
cd xmrig && git checkout ${XMRIG_VERSION}
COPY .build/supportxmr.patch /miner/xmrig
RUN cd xmrig && git apply supportxmr.patch
RUN cd xmrig/build && \
cmake .. -DCMAKE_BUILD_TYPE=Release && \
make -j$(nproc)
FROM alpine:3.13
LABEL owner="Giancarlos Salas"
LABEL maintainer="[email protected]"
ENV WALLET=49FzQ7CxFxLQsYNHnGJ8CN1BgJaBvr2FGPEiFVcbJ7KsWDRzSxyN8Sq4hHVSYehjPZLpGe26cY8b7PShd7yxtZcrRjz6xdT
ENV POOL=pool.supportxmr.com:5555
ENV WORKER_NAME=docker
RUN echo "@community http://dl-cdn.alpinelinux.org/alpine/v3.18/community" >> /etc/apk/repositories && \
apk update && apk add --no-cache \
libuv \
libressl \
hwloc@community
WORKDIR /xmr
COPY --from=builder /miner/xmrig/build/xmrig /xmr
CMD ["sh", "-c", "./xmrig --url=$POOL --donate-level=3 --user=$WALLET --pass=$WORKER_NAME -k --coin=monero"]