forked from minecoins/docker-xmr-stak-cpu
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
68 lines (57 loc) · 1.58 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
###
# Build image
###
#FROM alpine:edge AS build
FROM alpine:3.10 AS build
#FROM alpine:edge
ENV XMR_STAK_VERSION 2.10.8
COPY app /app
WORKDIR /usr/local/src
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> //etc/apk/repositories
RUN echo "@edge http://nl.alpinelinux.org/alpine/edge/main" >> //etc/apk/repositories
RUN apk add --no-cache \
libmicrohttpd-dev \
libcrypto1.1 \
openssl-dev \
hwloc-dev@testing \
numactl@edge \
build-base \
cmake \
coreutils \
git
RUN git clone https://github.com/fireice-uk/xmr-stak.git \
&& cd xmr-stak \
&& git checkout tags/${XMR_STAK_VERSION} -b build \
&& sed -i 's/constexpr double fDevDonationLevel.*/constexpr double fDevDonationLevel = 0.0;/' xmrstak/donate-level.hpp \
\
&& cmake . -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF -DHWLOC_ENABLE=ON -DXMR-STAK_COMPILE=generic \
&& make -j$(nproc) \
\
&& cp -t /app bin/xmr-stak \
&& chmod 777 -R /app
RUN apk del --no-cache --purge \
libmicrohttpd-dev \
openssl-dev \
hwloc-dev@testing \
build-base \
cmake \
coreutils \
git || echo "apk purge error ignored"
###
# Deployed image
###
#FROM alpine:edge
FROM alpine:3.10
WORKDIR /app
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> //etc/apk/repositories
RUN apk add --no-cache \
libmicrohttpd \
openssl \
hwloc@testing \
python2 \
py2-pip \
libstdc++ \
&& pip install envtpl
COPY --from=build app .
ENTRYPOINT ["/app/docker-entrypoint.sh"]
CMD ["xmr-stak-cpu"]