-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (37 loc) · 1.12 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
# Note: On Alpine 3.5 curl-dev uses LibreSSL which is incompatible with the required OpenSSL-dev.
FROM alpine:3.4
RUN set -x \
# Runtime dependencies.
&& apk add --no-cache \
libcurl \
libgcc \
libstdc++ \
openssl \
# Build dependencies.
&& apk add --no-cache -t .build-deps \
autoconf \
automake \
build-base \
curl \
curl-dev \
git \
openssl-dev \
# Compile from source code.
&& git clone --recursive https://github.com/tpruvot/cpuminer-multi.git /tmp/cpuminer \
&& cd /tmp/cpuminer \
&& ./autogen.sh \
&& ./configure CFLAGS="-O2 -march=native" --with-crypto --with-curl \
&& make install \
# Install dumb-init (avoid PID 1 issues).
# https://github.com/Yelp/dumb-init
&& curl -Lo /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64 \
&& chmod +x /usr/local/bin/dumb-init \
# Clean-up
&& cd / \
&& apk del --purge .build-deps \
&& rm -rf /tmp/* \
# Verify
&& cpuminer --cputest \
&& cpuminer --version
ENTRYPOINT ["dumb-init"]
CMD ["cpuminer", "--help"]