-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (23 loc) · 987 Bytes
/
Makefile
File metadata and controls
27 lines (23 loc) · 987 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
TAG ?= $(shell date '+%Y%m%d')
REPO ?= ghcr.io/eucham
ifneq ($(SV),)
SUB_VER = .$(SV)
endif
ifneq ($(INSECURE),)
INSECURE = --insecure
endif
ARCHES = arm64 amd64
build-push-multiarch:
@for ARCH in $ARCHES; do \
docker buildx build -t $(REPO)/shs:$(TAG)-$$ARCH --platform linux/$$ARCH --load --provenance=false .; \
docker push $(REPO)/shs:$(TAG)-$$ARCH; \
done
@docker manifest create $(INSECURE) $(REPO)/shs:$(TAG) $(foreach osarch, $(ARCHES), $(REPO)/shs:$(TAG)-${osarch})
@docker manifest push $(INSECURE) --purge $(REPO)/shs:$(TAG)
@docker manifest inspect $(INSECURE) $(REPO)/shs:$(TAG)
build:
docker buildx build -t $(REPO)/shs:$(TAG)$(SUB_VER) --platform linux/arm64 --load --provenance=false .
build-podman:
@podman manifest create shs:$(TAG)
@podman build --tls-verify=false --platform linux/arm64,linux/amd64 -f Dockerfile --manifest localhost/shs:$(TAG) .
@podman manifest push --tls-verify=false localhost/shs:$(TAG) $(REPO)/shs:$(TAG) $(REPO)/shs:latest