-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
26 lines (25 loc) · 920 Bytes
/
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
FROM debian:stable-slim AS BUILD
COPY src/donate.h /donate.h
RUN \
apt-get update &&\
apt-get install -y git build-essential cmake automake libtool autoconf wget &&\
git clone https://github.com/xmrig/xmrig.git &&\
mv /donate.h /xmrig/src/donate.h &&\
cat /xmrig/src/donate.h &&\
mkdir xmrig/build && cd xmrig/scripts &&\
./build_deps.sh && cd ../build &&\
cmake .. -DXMRIG_DEPS=scripts/deps &&\
make -j$(nproc) &&\
ldd xmrig &&\
/xmrig/build/xmrig --version &&\
/xmrig/build/xmrig --version | grep -i xmrig | cut -f 2 -d ' '
FROM debian:stable-slim
WORKDIR /xmrig
COPY --from=BUILD /xmrig/build/libxmrig-asm.a /xmrig/libxmrig-asm.a
COPY --from=BUILD /xmrig/build/xmrig /xmrig/xmrig
COPY src/config.json /xmrig/config.json
EXPOSE 8080
RUN \
echo "PATH=/xmrig:${PATH}" >> ~/.profile &&\
/xmrig/xmrig --version | grep -i xmrig | cut -f 2 -d ' '
CMD ["/xmrig/xmrig"]