added xmrig image
All checks were successful
CI / Build xmrig docker images (push) Successful in 1m31s
All checks were successful
CI / Build xmrig docker images (push) Successful in 1m31s
This commit is contained in:
38
.gitea/workflows/build-xmrig.yaml
Normal file
38
.gitea/workflows/build-xmrig.yaml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
name: CI
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
paths:
|
||||||
|
- 'xmrig/**'
|
||||||
|
- '.gitea/workflows/build-xmrig.yaml'
|
||||||
|
jobs:
|
||||||
|
"Build xmrig docker images":
|
||||||
|
runs-on: woryzen
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3.4.0
|
||||||
|
with:
|
||||||
|
driver: docker-container
|
||||||
|
-
|
||||||
|
name: Login to Gitea container registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: gitea.woggioni.net
|
||||||
|
username: woggioni
|
||||||
|
password: ${{ secrets.PUBLISHER_TOKEN }}
|
||||||
|
-
|
||||||
|
name: Build and push wildfly images
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: "{{defaultContext}}:xmrig"
|
||||||
|
push: true
|
||||||
|
pull: true
|
||||||
|
ssh: default=/home/luser/.ssh/id_ed25519
|
||||||
|
tags: |
|
||||||
|
"gitea.woggioni.net/woggioni/xmrig:latest"
|
||||||
|
"gitea.woggioni.net/woggioni/xmrig:6.24.0"
|
||||||
|
build-args: "VERSION=6.24.0"
|
||||||
|
cache-from: type=registry,ref=gitea.woggioni.net/woggioni/xmrig:buildx
|
||||||
|
cache-to: type=registry,mode=max,compression=zstd,image-manifest=true,oci-mediatypes=true,ref=gitea.woggioni.net/woggioni/xmrig:buildx
|
||||||
|
|
15
xmrig/001-remove-donation.patch
Normal file
15
xmrig/001-remove-donation.patch
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
diff --git a/src/donate.h b/src/donate.h
|
||||||
|
index 206b1b8f..14cdf9ea 100644
|
||||||
|
--- a/src/donate.h
|
||||||
|
+++ b/src/donate.h
|
||||||
|
@@ -37,8 +37,8 @@
|
||||||
|
* If you plan on changing donations to 0%, please consider making a one-off donation to my wallet:
|
||||||
|
* XMR: 48edfHu7V9Z84YzzMa6fUueoELZ9ZRXq9VetWzYGzKt52XU5xvqgzYnDK9URnRoJMk1j8nLwEVsaSWJ4fhdUyZijBGUicoD
|
||||||
|
*/
|
||||||
|
-constexpr const int kDefaultDonateLevel = 1;
|
||||||
|
-constexpr const int kMinimumDonateLevel = 1;
|
||||||
|
+constexpr const int kDefaultDonateLevel = 0;
|
||||||
|
+constexpr const int kMinimumDonateLevel = 0;
|
||||||
|
|
||||||
|
|
||||||
|
#endif // XMRIG_DONATE_H
|
51
xmrig/Dockerfile
Normal file
51
xmrig/Dockerfile
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
FROM alpine:3.22 AS base
|
||||||
|
|
||||||
|
FROM base AS build
|
||||||
|
ARG VERSION
|
||||||
|
RUN --mount=type=cache,target=/var/cache/apk apk add gcc g++ musl-dev cmake ninja hwloc-dev libuv-dev openssl-dev git upx
|
||||||
|
RUN adduser -D -S -h /home/luser luser
|
||||||
|
WORKDIR /home/luser
|
||||||
|
USER luser
|
||||||
|
ADD --chown=luser:luser git@github.com:xmrig/xmrig.git#v${VERSION} xmrig
|
||||||
|
ADD 001-remove-donation.patch .
|
||||||
|
RUN mkdir build
|
||||||
|
WORKDIR xmrig
|
||||||
|
RUN git apply /home/luser/001-remove-donation.patch
|
||||||
|
WORKDIR /home/luser
|
||||||
|
RUN cmake -G Ninja -S xmrig -B build -DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DWITH_VAES=TRUE \
|
||||||
|
-DWITH_RANDOMX=ON \
|
||||||
|
-DWITH_OPENCL=OFF \
|
||||||
|
-DWITH_MSR=ON \
|
||||||
|
-DWITH_CUDA=OFF \
|
||||||
|
-DWITH_BENCHMARK=OFF \
|
||||||
|
-DWITH_HWLOC=ON \
|
||||||
|
-DWITH_HTTP=ON \
|
||||||
|
-DWITH_SSE41=ON \
|
||||||
|
-DWITH_AVX2=ON \
|
||||||
|
-DWITH_ASM=ON \
|
||||||
|
-DWITH_ARGON2=ON \
|
||||||
|
-DWITH_ADL=ON \
|
||||||
|
-DWITH_CNPICO=ON \
|
||||||
|
-DWITH_CNLITE=ON \
|
||||||
|
-DWITH_CNHEAVY=ON \
|
||||||
|
-DWITH_CNFEMTO=ON \
|
||||||
|
-DWITH_GHOSTRIDER=ON \
|
||||||
|
-DWITH_KAWPOW=ON \
|
||||||
|
-DWITH_ENV_VARS=ON \
|
||||||
|
-DWITH_RANDOMX=ON
|
||||||
|
|
||||||
|
WORKDIR build
|
||||||
|
RUN ninja
|
||||||
|
RUN strip -s xmrig
|
||||||
|
RUN upx -6 xmrig
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
FROM base AS release
|
||||||
|
RUN --mount=type=cache,target=/var/cache/apk apk add hwloc libuv openssl
|
||||||
|
COPY --from=build /home/luser/build/xmrig /usr/local/bin/xmrig
|
||||||
|
RUN adduser -D -S -h /var/lib/xmrig xmrig
|
||||||
|
WORKDIR /var/lib/xmrig
|
||||||
|
USER xmrig
|
||||||
|
ENTRYPOINT ["/usr/local/lib/xmrig"]
|
Reference in New Issue
Block a user