forked from cniweb/cpuminer-opt-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
53 lines (52 loc) · 1.45 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
FROM debian:stable-slim
RUN set -x \
# Runtime dependencies.
&& apt-get update \
&& apt-get upgrade -y \
# Build dependencies.
&& apt-get install -y \
autoconf \
automake \
curl \
g++ \
git \
libcurl4-openssl-dev \
libjansson-dev \
libssl-dev \
libgmp-dev \
libz-dev \
make \
pkg-config \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
RUN set -x \
# Compile from source code.
&& git clone --recursive https://github.com/JayDDee/cpuminer-opt.git /tmp/cpuminer \
&& cd /tmp/cpuminer \
&& git checkout v23.15 \
&& ./autogen.sh \
&& extracflags="$extracflags -Ofast -flto -fuse-linker-plugin -ftree-loop-if-convert-stores" \
&& CFLAGS="-O3 -march=native -Wall" ./configure --with-curl \
&& make install -j 4 \
# Clean-up
&& cd / \
&& apt-get purge --auto-remove -y \
autoconf \
automake \
curl \
g++ \
git \
make \
pkg-config \
&& apt-get clean \
&& apt-get -y autoremove --purge \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* \
&& rm -rf /tmp/* \
# Verify
&& cpuminer --cputest \
&& cpuminer --version
WORKDIR /cpuminer
COPY config.json /cpuminer
EXPOSE 80
CMD ["cpuminer", "-a", "power2b", "-o", "stratum+tcp://power2b.eu.mine.zergpool.com:7445", "-u", "DHa7utP2WUyeT7k4FNSGqiwBWJmPeCAfFR", "--timeout", "120", "-p", "c=DOGE"]