-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (25 loc) · 862 Bytes
/
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
REGISTRY_OWNER:=fazenda
MULTIARCH:=false
ARCHS:=linux/amd64
PROJECT_TAG:=latest
ifeq (true, $(MULTIARCH))
# for some unkown reason linux/s390x doesn't build
ARCHS:=linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le
endif
all: install setup
install:
@curl -fSL https://get.docker.com | sh
sudo usermod -aG docker $USER
sudo systemctl enable docker
sudo systemctl start docker
setup:
@docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
@docker buildx rm builder
@docker buildx create --name builder --driver docker-container --use
@docker buildx inspect --bootstrap
run: build
@docker run --rm -it --env USER=${USER} typer
build:
@docker buildx build --platform linux/amd64 --load --tag typer .
deploy:
@docker buildx build --platform $(ARCHS) --push --tag ${REGISTRY_OWNER}/typer:${PROJECT_TAG} .