-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (39 loc) · 2.12 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#//////////////////////////////////////////////////////////////
#// ____ //
#// | __ ) ___ _ __ ___ _ _ _ __ ___ _ __ _ __ ___ //
#// | _ \ / _ \ '_ \/ __| | | | '_ \ / _ \ '__| '_ \ / __| //
#// | |_) | __/ | | \__ \ |_| | |_) | __/ | | |_) | (__ //
#// |____/ \___|_| |_|___/\__,_| .__/ \___|_| | .__/ \___| //
#// |_| |_| //
#//////////////////////////////////////////////////////////////
#// //
#// Script, 2021 //
#// Created: 11, June, 2021 //
#// Modified: 11, June, 2021 //
#// file: - //
#// - //
#// Source: //
#// https://www.docker.com/blog/getting-started-with-docker-for-arm-on-linux/
#// https://schinckel.net/2021/02/12/docker-%2B-makefile/
#// https://www.padok.fr/en/blog/multi-architectures-docker-iot
#// OS: ALL //
#// CPU: ALL //
#// //
#//////////////////////////////////////////////////////////////
#Disable archlinux
IMAGE_LIST := debian alpine ubuntu fedora cuda
IMAGE_NAME := bensuperpc/xmrig
VERSION := 1.0.0
DOCKER := docker
all: $(IMAGE_LIST)
$(IMAGE_LIST):
$(MAKE) all IMAGE_NAME="$(IMAGE_NAME)" VERSION="$(VERSION)" IMAGE_SUBTAG="$@" -C $@
# https://github.com/linuxkit/linuxkit/tree/master/pkg/binfmt
qemu:
export DOCKER_CLI_EXPERIMENTAL=enabled
$(DOCKER) run --rm --privileged multiarch/qemu-user-static --reset -p yes
$(DOCKER) buildx create --name qemu_builder --driver docker-container --use
$(DOCKER) buildx inspect --bootstrap
clean:
$(DOCKER) images --filter='reference=$(IMAGE_NAME)' --format='{{.Repository}}:{{.Tag}}' | xargs -r $(DOCKER) rmi -f | true
.PHONY : $(IMAGE_LIST) clean qemu all