{"id":18191995,"url":"https://github.com/codekow/container-xmrig","last_synced_at":"2025-06-30T17:37:38.316Z","repository":{"id":40476272,"uuid":"429978517","full_name":"codekow/container-xmrig","owner":"codekow","description":"XMR Container - mine Monero / CPU benchmark with a container. k8s and OpenShift templates","archived":false,"fork":false,"pushed_at":"2025-03-29T16:44:30.000Z","size":193,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T17:31:52.649Z","etag":null,"topics":["benchmark","docker","k8s","kubernetes","monero","monero-mining","openshift","podman","xmr","xmrig"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codekow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-20T01:19:04.000Z","updated_at":"2025-03-29T16:44:33.000Z","dependencies_parsed_at":"2024-04-01T01:25:48.614Z","dependency_job_id":"c34598b5-e5db-4644-961a-f7a88a4d0f29","html_url":"https://github.com/codekow/container-xmrig","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codekow/container-xmrig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekow%2Fcontainer-xmrig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekow%2Fcontainer-xmrig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekow%2Fcontainer-xmrig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekow%2Fcontainer-xmrig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codekow","download_url":"https://codeload.github.com/codekow/container-xmrig/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekow%2Fcontainer-xmrig/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262819979,"owners_count":23369571,"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":["benchmark","docker","k8s","kubernetes","monero","monero-mining","openshift","podman","xmr","xmrig"],"created_at":"2024-11-03T06:41:58.473Z","updated_at":"2025-06-30T17:37:38.265Z","avatar_url":"https://github.com/codekow.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XMRig Container - Mine / Benchmark in Docker / Podman / Kubernetes\n\n[![Publish xmrig](https://github.com/codekow/container-xmrig/actions/workflows/publish-xmrig.yml/badge.svg)](https://github.com/codekow/container-xmrig/actions/workflows/publish-xmrig.yml)\n[![Publish xmrig-proxy](https://github.com/codekow/container-xmrig/actions/workflows/publish-xmrig-proxy.yml/badge.svg)](https://github.com/codekow/container-xmrig/actions/workflows/publish-xmrig-proxy.yml)\n[![Publish xmrig-cuda](https://github.com/codekow/container-xmrig/actions/workflows/publish-xmrig-cuda.yml/badge.svg)](https://github.com/codekow/container-xmrig/actions/workflows/publish-xmrig-cuda.yml)\n\nThe purpose of this repo is to have a way to test limits and burn in hardware. \n\nHave you configured your security policies and resource limits effectively to curb user abuse?\n\nManaging resources in Kubernetes can be a challenge. This repo is intended to simulate heavy workloads in order to observe enforcement of configured limits and security controls / policies.\n\nWhatever your goal... launch Xmrig in Podman, Docker, or Kubernetes.\n\n## Xmrig\n\n:warning: NOTICE :warning:\n\n[Xmrig](https://xmrig.com) is an open-source project for mining [Monero](https://www.getmonero.org) (XMR) cryptocurrency. It allows you to mine for a pool and receive Monero.\n\nRunning the container(s) without parameters ~~helps contribute $$~~ [sends metrics](https://moneroocean.stream/#/dashboard?addr=4AwPZobe6PsLbfk5ntnv6Wa9DPL3aPd4N2b761EmsMpAQbBaJaAajQGhtBXDL9Mo4G649oAmWzNJU5L3YBS458iw2XkJp26) for this project.\n\n## Getting Started\n\n### Usage Docker / Podman\n\n```sh\ndocker run -it --rm ghcr.io/codekow/xmrig\n```\n\n```sh\npodman run -it --rm ghcr.io/codekow/xmrig\n```\n\nRun meta miner\n\n```sh\n# see xmrig/bin/entrypoint.sh for more info.\n# this might get documented... :)\npodman run -it --rm ghcr.io/codekow/xmrig start_meta_miner\n```\n\nExamples below will use `podman` but should work the same with `docker`\n\n### Environment Variables\n\nFor those of you who want to ~~get rich~~ [lose money](https://whattomine.com/coins/101-xmr-cryptonight?hr=2.0\u0026p=80\u0026fee=1.0\u0026cost=0.18\u0026cost_currency=USD\u0026hcost=0.0\u0026span_br=\u0026span_d=24\u0026commit=Calculate) mining, use the following example to configure your container(s).\n\nNOTE: This container does not run as `root` by default\n\n```sh\nexport POOL_URL=\"Pool URL\"\nexport POOL_USER=\"Public Monero address\"\nexport POOL_PASS=\"Miner ID - optional for most pools\"\nexport DONATE_LEVEL=\"Donation in percent, default: 1\"\nexport EXTRA_ARGS=\"Other parameters to pass to xmrig\"\n\npodman run \\\n  -it --rm \\\n  --name miner \\\n  -e POOL_URL=$POOL_URL \\\n  -e POOL_USER=$POOL_USER \\\n  -e POOL_PASS=$POOL_PASS \\\n  -e DONATE_LEVEL=$DONATE_LEVEL \\\n  -e EXTRA_ARGS=$EXTRA_ARGS \\\n  ghcr.io/codekow/xmrig\n```\n\n## Run as `root`\n\nRunning processes as `root` comes with risks and rewards (like most things).\n\nIf you are trying to:\n\n- Improve hash rates (aka: performance) modifying [Model Specific Register](https://xmrig.com/docs/miner/randomx-optimization-guide/msr) (MSR)\n- Like [taking risks](https://xkcd.com/1252)\n- Have a history of making [bad choices](https://en.wikipedia.org/wiki/Hot_Pockets)\n\nThen the following is for you.\n\n```sh\nsudo podman run \\\n  -it --rm \\\n  --privileged \\\n  -u root \\\n  -v /lib/modules:/lib/modules:ro \\\n  -e POOL_PASS=$(hostname) \\\n  ghcr.io/codekow/xmrig\n```\n\n```sh\nsudo podman run \\\n  -it --rm \\\n  --privileged \\\n  -u root \\\n  -v /lib/modules:/lib/modules:ro \\\n  -e POOL_PASS=$(hostname) \\\n   --device nvidia.com/gpu=all \\\n   --security-opt=label=disable \\\n  ghcr.io/codekow/xmrig:latest-cuda\n  ```\n\nNOTE: mounting `/lib/modules` read-only inside the container allows compatibility with more systems, but is usually not required.\n\n## Development\n\nPlease throw away your cryptocurrency at the address below.\n\nXMR:\n\n`4AwPZobe6PsLbfk5ntnv6Wa9DPL3aPd4N2b761EmsMpAQbBaJaAajQGhtBXDL9Mo4G649oAmWzNJU5L3YBS458iw2XkJp26`\n\nFor those with time to look at the code...\n\n```sh\n# ubuntu\napt install podman\napt install curl git make aspell python3.10-venv\n```\n\n```sh\n# run before submitting a PR\nmake lint\nmake build\n```\n\n## Links\n\n- [Xmrig](https://xmrig.com)\n- [Monero](https://www.getmonero.org)\n- [Nvidia - Documentation](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/)\n- [Nvidia - Podman using CDI](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/cdi-support.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodekow%2Fcontainer-xmrig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodekow%2Fcontainer-xmrig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodekow%2Fcontainer-xmrig/lists"}