2018-12-11 13:47:10 +00:00
|
|
|
FROM mono:5.16 AS webminerpool-build
|
2018-07-02 13:59:27 +00:00
|
|
|
|
|
|
|
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 && \
|
2018-12-11 13:47:10 +00:00
|
|
|
rm -rf /var/lib/apt/lists/* && \
|
2018-07-02 13:59:27 +00:00
|
|
|
cd /hash_cn/libhash && \
|
|
|
|
make && \
|
|
|
|
cd /server && \
|
|
|
|
msbuild Server.sln /p:Configuration=Release_Server /p:Platform="any CPU"
|
|
|
|
|
|
|
|
|
|
|
|
VOLUME ["/root"]
|
2018-12-11 13:47:10 +00:00
|
|
|
FROM mono:5.16
|
2018-07-02 13:59:27 +00:00
|
|
|
|
|
|
|
RUN mkdir /webminerpool
|
|
|
|
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"]
|