From 473e14f25203a44bc9efb566c8c5034e6d02f83e Mon Sep 17 00:00:00 2001 From: bobz965 Date: Sat, 21 Sep 2024 14:23:20 +0800 Subject: [PATCH] support build-kit local cache fast build kube-ovn image Signed-off-by: bobz965 --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 2c1bd193309..35acc2a63e8 100644 --- a/Makefile +++ b/Makefile @@ -167,6 +167,11 @@ base-arm64: docker buildx build --platform linux/arm64 --build-arg ARCH=arm64 --build-arg GO_VERSION=$(GO_VERSION) -t $(REGISTRY)/kube-ovn-base:$(RELEASE_TAG)-arm64 -o type=docker -f dist/images/Dockerfile.base dist/images/ docker buildx build --platform linux/arm64 --build-arg ARCH=arm64 --build-arg GO_VERSION=$(GO_VERSION) --build-arg DEBUG=true -t $(REGISTRY)/kube-ovn-base:$(DEBUG_TAG)-arm64 -o type=docker -f dist/images/Dockerfile.base dist/images/ + +.PHONY: build-kit +build-kit: build-go + DOCKER_BUILDKIT=1 docker build -t $(REGISTRY)/kube-ovn:$(RELEASE_TAG) --build-arg VERSION=$(RELEASE_TAG) -o type=docker -f dist/images/Dockerfile dist/images/ + .PHONY: image-kube-ovn image-kube-ovn: image-kube-ovn-debug build-go docker buildx build --platform linux/amd64 -t $(REGISTRY)/kube-ovn:$(RELEASE_TAG) --build-arg VERSION=$(RELEASE_TAG) -o type=docker -f dist/images/Dockerfile dist/images/