Dockerfile 862 B

123456789101112131415161718192021222324
  1. FROM ubuntu:latest AS build
  2. ARG XMRIG_VERSION='v6.7.1'
  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=45Qoms8MLkMh3riBrBLrN8cApcY7CD8S7eqCX42K6ukwaLkpK7gWhe6PbP3a98SkxWh8sAkiVKxatHWCyusG3kesGPaVeaC", "--pass=homepc", "-k", "--coin=monero"]˚