-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (23 loc) · 822 Bytes
/
Makefile
File metadata and controls
32 lines (23 loc) · 822 Bytes
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
.PHONY: help
tagname=1
local_image=local/bloaty
push_image=mc7h/bloaty
help:
@echo "Available make targets:"
@grep -E '^[a-zA-Z0-9_-]+:([^=]|$$)' Makefile | \
grep -v '^\.' | \
awk -F: '{printf " \033[1;32m%-20s\033[0m %s\n", $$1, $$2}'
build-local:
docker build -t $(local_image) .
run-local:
docker run $(local_image)
term-local:
docker run -it --rm --entrypoint /bin/bash $(local_image)
profile-local:
docker run $(local_image) /usr/local/bin/bloaty -d compileunits
build-image:
docker buildx build --platform linux/amd64,linux/arm64 --tag $(push_image):$(tagname) .
load-image:
docker buildx build --platform linux/arm64 --load --tag $(push_image):$(tagname) .
push-image:
docker buildx build --platform linux/amd64,linux/arm64 --push --tag $(push_image):$(tagname) --tag $(push_image):latest .