xmrig-docker/Dockerfile

34 lines
911 B
Docker

# The 'latest' tag is the latest LTS
FROM ubuntu:latest
ENV DEBIAN_FRONTEND noninteractive
ENV TZ UTC
RUN apt-get -y update && apt-get install -y build-essential cmake libuv1-dev libssl-dev libhwloc-dev git wget ruby ruby-dev rubygems python3 jq
RUN gem install --no-document fpm
COPY wget.sh /usr/local/bin/wget
ENV PATH "/usr/local/bin:${PATH}"
# install the build deps first because git gets tainted, needs to do git diff
# ./build.uv.sh
# ./build.hwloc.sh
# ./build.openssl.sh
# 2>&1
WORKDIR /sudois/xmrig/scripts
RUN mkdir /sudois/xmrig/build
COPY ./xmrig/scripts /sudois/xmrig/scripts
RUN ./build_deps.sh > /dev/null
COPY ./xmrig /sudois/xmrig
COPY no-donation.patch /sudois
WORKDIR /sudois/xmrig
RUN git apply /sudois/no-donation.patch && git --no-pager diff --color=always
WORKDIR /sudois/xmrig/build
COPY deb/make_config.py deb/make_deb.sh /deb/
COPY xmrig-ctl.py /sudois/
RUN /deb/make_deb.sh