Build multi-arch images by default
This commit is contained in:
parent
0f20548386
commit
d250b97b43
18 changed files with 226 additions and 206 deletions
|
|
@ -17,17 +17,27 @@
|
|||
# Use the 0.0 tag for testing, it shouldn't clobber any release builds
|
||||
TAG ?= 0.0
|
||||
|
||||
HOSTARCH := $(shell uname -m | sed -e s/x86_64/amd64/ \
|
||||
-e s/s390x/s390x/ \
|
||||
-e s/armv7l/arm/ \
|
||||
-e s/aarch64.*/arm64/)
|
||||
|
||||
ifndef ARCH
|
||||
ARCH := $(HOSTARCH)
|
||||
endif
|
||||
ifeq ($(ARCH),)
|
||||
$(error mandatory variable ARCH is empty)
|
||||
endif
|
||||
|
||||
REGISTRY ?= ingress-controller
|
||||
DOCKER ?= docker
|
||||
|
||||
IMGNAME = cfssl
|
||||
IMAGE = $(REGISTRY)/$(IMGNAME)
|
||||
IMAGE = $(REGISTRY)/cfssl
|
||||
|
||||
container:
|
||||
$(DOCKER) buildx build \
|
||||
image:
|
||||
docker buildx build \
|
||||
--load \
|
||||
--platform linux/amd64 \
|
||||
--platform $(ARCH) \
|
||||
-t $(IMAGE):$(TAG) rootfs
|
||||
|
||||
clean:
|
||||
$(DOCKER) rmi -f $(IMAGE):$(TAG) || true
|
||||
docker rmi -f $(IMAGE):$(TAG) || true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue