Created
December 17, 2019 08:26
-
-
Save snowdream/3d58122ad85c3ac8a86e5815a3b3d32e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:latest | |
LABEL maintainer="snowdream <[email protected]>" | |
ENV CPULIMIT_VERSION 0.2 | |
ENV XMRIG_VERSION 5.3.0 | |
RUN dnf groupinstall -y 'Development Tools' \ | |
&& dnf install -y wget \ | |
&& cd /root \ | |
&& wget --no-check-certificate -c https://github.com/opsengine/cpulimit/archive/v${CPULIMIT_VERSION}.tar.gz \ | |
&& tar zxvf v${CPULIMIT_VERSION}.tar.gz \ | |
&& cd cpulimit-${CPULIMIT_VERSION} \ | |
&& make \ | |
&& cp src/cpulimit /usr/bin/ \ | |
&& cd /root \ | |
&& wget --no-check-certificate -c https://github.com/C3Pool/profit-switching-miner/blob/master/xmrig-${XMRIG_VERSION}-profit-switching-Linux.tar.gz?raw=true -O xmrig-${XMRIG_VERSION}-profit-switching-Linux.tar.gz \ | |
&& tar zxvf xmrig-${XMRIG_VERSION}-profit-switching-Linux.tar.gz \ | |
&& cd xmrig-${XMRIG_VERSION}-prifit-switching-Linux \ | |
&& cp xmrig /usr/bin/ \ | |
&& mkdir -p /etc/xmrig \ | |
&& cp config.json /etc/xmrig \ | |
&& sed -i "s/YOUR_WALLET_ADDRESS/46PtMFqfymhcHchS7vwjwoMm9v8jyvK6xMZKygZh8nk3LLoRg4jq7sKa9c22bXvfQ8KWogR1DETzVTsAuGffjaBtHVPZ4gs/g" /etc/xmrig/config.json\ | |
&& cd /root \ | |
&& rm v${CPULIMIT_VERSION}.tar.gz \ | |
&& rm -rf cpulimit-${CPULIMIT_VERSION} \ | |
&& rm xmrig-${XMRIG_VERSION}-profit-switching-Linux.tar.gz \ | |
&& rm -rf xmrig-${XMRIG_VERSION}-prifit-switching-Linux \ | |
&& dnf group remove -y 'Development Tools' \ | |
&& dnf clean all | |
ENTRYPOINT /usr/bin/xmrig -c /etc/xmrig/config.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
docker build -t xmr .
docker run --restart=always --network host --name xmr -d xmr