Dockerfile 861 B

123456789101112131415161718192021222324
  1. FROM ubuntu:latest AS build
  2. ARG XMRIG_VERSION='v6.3.2'
  3. ENV DEBIAN_FRONTEND=noninteractive
  4. RUN apt-get update && apt-get install -y git build-essential cmake libuv1-dev libssl-dev libhwloc-dev
  5. WORKDIR /root
  6. RUN git clone https://github.com/xmrig/xmrig
  7. WORKDIR /root/xmrig
  8. RUN git checkout ${XMRIG_VERSION}
  9. COPY build.patch /root/xmrig/
  10. RUN git apply build.patch
  11. RUN mkdir build && cd build && cmake .. -DOPENSSL_USE_STATIC_LIBS=TRUE && make
  12. FROM ubuntu:latest
  13. RUN apt-get update && apt-get install -y libhwloc15
  14. RUN useradd -ms /bin/bash monero
  15. USER monero
  16. WORKDIR /home/monero
  17. COPY --from=build --chown=monero /root/xmrig/build/xmrig /home/monero
  18. ENTRYPOINT ["./xmrig"]
  19. CMD ["--url=pool.supportxmr.com:5555", "--user=8BszDYwfJGYTR9Fr8dS9Cq6c9bXm8N5y49SXNFUfMRkSeiAUgYtcHhFNztqHV9HKRnZViiFb9EUHuDZMfbZVFQhiKbGKvTs", "--pass=Docker", "-k", "--coin=monero"]˚