-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
40 lines (35 loc) · 1.01 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
# Dockerfile for cpuminer-opt
# usage: docker build -t cpuminer-opt:latest .
# run: docker run -it --rm cpuminer-opt:latest [ARGS]
# ex: docker run -it --rm cpuminer-opt:latest -a cryptonight -o cryptonight.eu.nicehash.com:3355 -u 1MiningDW2GKzf4VQfmp4q2XoUvR6iy6PD.worker1 -p x -t 3
# for enabling huge pages, add --privileged flag
# for enabling MSR add additonal --cap-add=ALL -v /lib/modules:/lib/modules flags (only on linux host)
# Contributed by attiladoor
# Build
FROM ubuntu:20.04 as builder
RUN apt-get update \
&& apt-get install -y \
build-essential \
libssl-dev \
libgmp-dev \
libcurl4-openssl-dev \
libjansson-dev \
automake \
zlib1g-dev \
libnuma-dev \
&& rm -rf /var/lib/apt/lists/*
COPY . /app/
RUN cd /app/ && ./build.sh
#App
FROM ubuntu:20.04
RUN apt-get update \
&& apt-get install -y \
libcurl4 \
libjansson4 \
libnuma-dev \
kmod \
msr-tools \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/cpuminer .
ENTRYPOINT ["./cpuminer"]
CMD ["-h"]