{"id":19075790,"url":"https://github.com/lpsm-dev/docker-crypto-miner","last_synced_at":"2025-04-07T10:20:18.446Z","repository":{"id":37858588,"uuid":"422376961","full_name":"lpsm-dev/docker-crypto-miner","owner":"lpsm-dev","description":"👾  A user-friendly image that can be used for mining cryptocurrencies with your CPU","archived":false,"fork":false,"pushed_at":"2025-03-03T14:46:25.000Z","size":1092,"stargazers_count":66,"open_issues_count":0,"forks_count":22,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T09:03:39.179Z","etag":null,"topics":["alpine","container","cpu-mining","cpuminer","crypto","cryptocurrency","cryptonight","docker","docker-compose","helm","kubernetes","mining","multi-arch-images","randomx","xmrig"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lpsm-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-28T22:51:35.000Z","updated_at":"2025-03-25T16:17:43.000Z","dependencies_parsed_at":"2024-06-14T06:43:47.808Z","dependency_job_id":"6f3e3950-47a0-42f6-984e-2cc02d771cb2","html_url":"https://github.com/lpsm-dev/docker-crypto-miner","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpsm-dev%2Fdocker-crypto-miner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpsm-dev%2Fdocker-crypto-miner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpsm-dev%2Fdocker-crypto-miner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpsm-dev%2Fdocker-crypto-miner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lpsm-dev","download_url":"https://codeload.github.com/lpsm-dev/docker-crypto-miner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247631833,"owners_count":20970069,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpine","container","cpu-mining","cpuminer","crypto","cryptocurrency","cryptonight","docker","docker-compose","helm","kubernetes","mining","multi-arch-images","randomx","xmrig"],"created_at":"2024-11-09T01:56:00.653Z","updated_at":"2025-04-07T10:20:18.401Z","avatar_url":"https://github.com/lpsm-dev.png","language":"HCL","readme":"\u003c!-- BEGIN_TF_DOCS --\u003e\n\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n\u003cimg alt=\"gif-header\" src=\"https://github.com/lpsm-dev/lpsm-dev/blob/main/.github/assets/gif-header.gif\" width=\"225\"/\u003e\n\n\u003ch2\u003eDocker Crypto Miner\u003c/h2\u003e\n\n[![Semantic Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)]()\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)]()\n[![GitHub repo size](https://img.shields.io/github/repo-size/lpsm-dev/personal-resume)]()\n\n\u003cimg alt=\"gif-about\" src=\"https://github.com/lpsm-dev/lpsm-dev/blob/main/.github/assets/gif-about.gif\" width=\"225\"/\u003e\n\n\u003cp\u003eA containerized solution for mining crypto using \u003ca href=https://github.com/xmrig/xmrig\u003eXMRig\u003c/a\u003e miner\u003c/p\u003e\n\n\u003cp\u003e\n  \u003ca href=\"#-description-\"\u003eDescription\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"#-getting-started-\"\u003eGetting Started\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"#-concepts-\"\u003eConcepts\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"#-links-\"\u003eLinks\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"#-donations-\"\u003eDonations\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"#-versioning-\"\u003eVersioning\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003ca href=\"#-troubleshooting-\"\u003eTroubleshooting\u003c/a\u003e\n\u003c/p\u003e\n\n\u003c/div\u003e\n\n## ➤ Important Note \u003ca name=\"#-important-node\"\u003e\u003c/a\u003e\n\n**🚨 This repository is intended for educational and ethical purposes. Please note that the creators cannot be held responsible for any misuse by individuals. However, we encourage you to use this resource at your own risk.**\n\n**🚨 Before mining in the cloud or using private equipment or an on-site data center, we recommend that you carefully review your provider's terms and conditions.**\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## ➤ Description \u003ca name=\"#-description\"\u003e\u003c/a\u003e\n\nThis repository contains a containerized setup of the xmrig tool, which allows you to go from zero to mining in about 5 minutes on any architecture running containers.\n\nCPU mining can be profitable using algorithms such as: `RandomX`, `Cryptonight` or `Equihash`. Learn more about profitability [here](https://www.nicehash.com/profitability-calculator).\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## ➤ Getting Started \u003ca name=\"#-getting-started\"\u003e\u003c/a\u003e\n\n### Setup\n\nTo configure your system for the development of this project, follow the steps below:\n\n- Install [asdf](https://asdf-vm.com/) to manage runtime dependencies.\n- Install runtime dependencies.\n\n```bash\ncut -d' ' -f1 .tool-versions | xargs -I{} sh -c 'asdf plugin add \"$1\"' -- {}\nasdf install\n```\n\n- Run task from the root of the repository to see available commands. We use task in place of make for this project. See [Taskfile.yml](Taskfile.yml) for more information.\n\n### Variables\n\nThe preferred way to configure XMRig is using a configuration file in JSON format, because it is more flexible and easier to use. The CLI doesn't cover all the features available and can be a limiting factor, depending on the scenario.\n\n| Name                  | Description                   |\n|-------------------    |-----------------------------  |\n| MINING_POOL           | URL of mining server          |\n| MINING_COIN           | Coin to mining                |\n| REFERRAL_CODE         | Param to educe mining rater   |\n| WALLET_ADDRESS        | Wallet address                |\n| WORKER_NAME           | Worker name                   |\n| XMRIG_CONFIG_FILE     | XMRig config file reference   |\n\n### Running\n\n**Docker**\n\n\u003cdetails\u003e\n\u003csummary\u003eContainer\u003c/summary\u003e\n\u003cp\u003e\n\nJust a simple example that you can use to run this container:\n\n```bash\ndocker container run \\\n  --restart unless-stopped --name crypto-miner -d \\\n  -e MINING_POOL=\"rx.unmineable.com:3333\" \\\n  -e MINING_COIN=\"SHIB\" \\\n  -e REFERRAL_CODE=\"7lkr-kmhq\" \\\n  -e WALLET_ADDRESS=\"\u003cyour-wallet-address\u003e\" \\\n  -e WORKER_NAME=\"docker-mining\" \\\n  ghcr.io/lpsm-dev/docker-crypto-miner:main\n```\n\nClick [here](https://github.com/lpsm-dev/docker-crypto-miner/pkgs/container/docker-crypto-miner/versions) to see available image tags.\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eLogs\u003c/summary\u003e\n\u003cp\u003e\n\nShows information logged of the running container:\n\n```bash\ndocker logs -f crypto-miner\n```\n\nor\n\n```bash\ndocker logs --tail 1000 crypto-miner\n```\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n**Kubernetes**\n\n\u003cdetails\u003e\n\u003csummary\u003ePods\u003c/summary\u003e\n\u003cp\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n\u003cimg alt=\"gif-about\" src=\".github/assets/k9s.png\" width=\"900\"/\u003e\n\n\u003c/div\u003e\n\nFor more information [here](./infra/README.md).\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## ➤ Concepts\n\nThis section aims to describe at a high level which tools we use and how we use them, without reproducing documentation that is better written (and more up-to-date) in the repositories and websites of the tools themselves. It is recommended that you familiarize yourself with these tools as soon as possible.\n\n### XMRig\n\nBasically, XMRig is a free, open-source mining program. It can be installed on Windows, Linux and macOS, and allows you to mine using the RandomX algorithm. Here's a brief example of the run command:\n\n```bash\nxmrig.exe -o rx.unmineable.com:3333 -a rx -k -u COIN:YOUR_ADDRESS.WORKER_NAME#REFERRAL_CODE -p x pause\n```\n\n- **COIN**: it's the coin that you're extracting, for example: **ADA**, **TRX**, **WIN** or more. Also, keep the `:` symbol between the currency and your address.\n- **YOUR_ADDRESS**: must be a valid address for the currency you choose, otherwise the pool will return an error, also be sure to check the supported network for some currencies like TRC20 for USDT mining (TRON address).\n- **WORKER_NAME**: it's any name that you would like to define for your worker.\n- **REFERRAL_CODE**: it's the parameter used to reduce the mining rate.\n\n### Unmineable\n\nUnmineable is a mining pool that allows anyone to become a miner using a personal computer.\n\n### ASIC\n\nThe acronym ASIC describes a series of computer devices designed from start to finish to provide maximum performance in cryptocurrency mining tasks.\n\n### RandomX\n\nRandomX is a proof-of-work (PoW) algorithm that is optimized for general-purpose CPUs. RandomX uses random code execution (hence the name) along with various hard memory techniques to minimize the efficiency advantage of specialized hardware.\n\n### Mining Rig\n\nA mining rig is a mining platform. The rig can be a dedicated miner, where it has been bought, built and operated specifically for mining, or it can be a computer that fulfills other needs, such as a gaming system, and is used to mine only part-time.\n\n### CPU Limit\n\nCpulimit is a tool that allows us to limit CPU usage by process. It gives us a few ways to identify the desired process, either by process name, PID or executable path. It's useful for controlling batch tasks when you don't want them to consume too many CPU cycles. The aim is to prevent a process from running for more than a certain amount of time. It is also able to adapt to the overall system load dynamically and quickly.\n\n### Security\n\n\u003cdiv align=\"center\"\u003e\n\n\u003cimg alt=\"gif-about\" src=\".github/assets/security.jpg\" width=\"375\"/\u003e\n\n\u003c/div\u003e\n\nPay attention to the images you use for these purposes and protect yourself against cryptojacking. Containers have become frequent targets for threat actors carrying out malicious cryptocurrency mining and other attacks. Last year, Trend Micro came across activities by cryptocurrency miners that were implemented as rogue containers using a community-distributed image published on Docker Hub. In May, researchers found an open directory that contained a malicious cryptocurrency miner and a distributed denial of service (DDoS) bot that targeted open Docker daemon ports. In the attack, an Alpine Linux container was created to host the cryptocurrency miner and the DDoS bot.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## ➤ Links\n\n- [XMRig configuration wizard](https://xmrig.com/wizard)\n- [Unmineable](https://unmineable.com)\n- [Profit Calculator](https://www.coincalculators.io)\n- [Optimize CPU minning performance](https://www.nicehash.com/blog/post/how-to-optimize-cpu-mining-performance-for-monero-random-x)\n- [Mining Reward Estimates](https://www.coinwarz.com)\n- [Explain RandomX algorithm](https://academy.bit2me.com/en/which-mining-algorithm-randomx-monero)\n- [What is ASIC?](https://academy.bit2me.com/pt/quem-s%C3%A3o-mineiros-asic)\n- [Cloud Vultr](https://www.vultr.com)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## ➤ Versioning \u003ca name=\"#-versioning\"\u003e\u003c/a\u003e\n\nTo check the change history, please access the [**CHANGELOG.md**](CHANGELOG.md) file.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## ➤ Troubleshooting \u003ca name=\"#-troubleshooting\"\u003e\u003c/a\u003e\n\nIf you have any problems, [open an issue in this project](https://github.com/lpsm-dev/docker-crypto-miner/issues).\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## ➤ Show your support \u003ca name=\"-show-your-support\"\u003e\u003c/a\u003e\n\n\u003cdiv align=\"center\"\u003e\n\nGive me a ⭐️ if this project helped you!\n\n\u003cimg alt=\"gif-footer\" src=\"https://github.com/lpsm-dev/lpsm-dev/blob/main/.github/assets/yoda.gif\" width=\"225\"/\u003e\n\nMade with 💜 by [me](https://github.com/lpsm-dev) 👋 inspired on [readme-md-generator](https://github.com/kefranabg/readme-md-generator)\n\n\u003c/div\u003e\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\u003c!-- END_TF_DOCS --\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpsm-dev%2Fdocker-crypto-miner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flpsm-dev%2Fdocker-crypto-miner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpsm-dev%2Fdocker-crypto-miner/lists"}