forked from notgiven688/webminerpool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (34 loc) · 1.15 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
FROM mono:5.16 AS webminerpool-build
ARG DONATION_LEVEL=0.03
COPY server /server
COPY hash_cn /hash_cn
RUN sed -ri "s/^(.*DonationLevel = )[0-9]\.[0-9]{2}/\1${DONATION_LEVEL}/" /server/Server/DevDonation.cs && \
apt-get -qq update && \
apt-get -qq install build-essential && \
rm -rf /var/lib/apt/lists/* && \
cd /hash_cn/libhash && \
make && \
cd /server && \
msbuild Server.sln /p:Configuration=Release_Server /p:Platform="any CPU"
FROM mono:5.16
RUN mkdir /webminerpool
# Install acme.sh
RUN apt-get -qq update && \
apt-get install -qq \
coreutils \
cron \
curl \
git \
openssl \
socat && \
rm -rf /var/lib/apt/lists/* && \
git clone https://github.com/Neilpang/acme.sh.git /root/acme.sh && \
cd /root/acme.sh && \
git checkout 2.7.9 && \
/root/acme.sh/acme.sh --install --home /root/.acme.sh
COPY entrypoint.sh /entrypoint.sh
COPY --from=webminerpool-build /server/Server/bin/Release_Server/server.exe /webminerpool
COPY --from=webminerpool-build /server/Server/bin/Release_Server/pools.json /webminerpool
COPY --from=webminerpool-build /hash_cn/libhash/libhash.so /webminerpool
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["./entrypoint.sh"]