docker-xmrig/Makefile

34 lines
784 B
Makefile
Raw Normal View History

2022-07-18 11:29:02 +03:00
VERSION = 6.18.0
REL = $(VERSION)-1
2019-10-12 01:31:10 +03:00
THREADS = $(shell nproc)
PRIORITY = 0
2019-10-12 02:06:57 +03:00
REPO=metal3d/xmrig
2019-10-12 01:31:10 +03:00
2019-10-12 02:06:57 +03:00
HUB=https://hub.docker.com/v2
2019-10-12 01:31:10 +03:00
all: build run
2019-10-10 19:21:47 +03:00
build:
2019-10-12 02:06:57 +03:00
docker build -t $(REPO):$(REL) --build-arg VERSION=$(VERSION) .
docker tag $(REPO):$(REL) $(REPO):latest
2019-10-10 19:21:47 +03:00
run:
2019-10-12 02:06:57 +03:00
docker run --rm -it -e THREADS=$(THREADS) -e PRIORITY=$(PRIORITY) $(REPO):$(REL)
deploy: build
docker push $(REPO):$(REL)
docker push $(REPO):latest
test:
.ONESHELL:
set-description:
ifdef PASSWORD
@echo "Changing description"
token=`http $(HUB)/users/login username=$(USERNAME) password=$(PASSWORD) | jq -r '.token'`
http --form PATCH $(HUB)/repositories/metal3d/xmrig/ Authorization:"JWT $$token" full_description=@README.md
else
@echo "You need to provide repo password in PASSWORD variable argument"
endif