From ed9af610e5bdc254bc5a822c86d03ddfd7b17761 Mon Sep 17 00:00:00 2001 From: Lyndon-Li Date: Fri, 6 Dec 2024 14:48:47 +0800 Subject: [PATCH] support specified buildx instance Signed-off-by: Lyndon-Li --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 2d3aa6703b..67e528bf8e 100644 --- a/Makefile +++ b/Makefile @@ -220,8 +220,15 @@ container: ifneq ($(BUILDX_ENABLED), true) $(error $(BUILDX_ERROR)) endif + +ifeq ($(BUILDX_INSTANCE),) + @echo creating a buildx instance -docker buildx rm velero-builder || true @docker buildx create --use --name=velero-builder +else + @echo using a specified buildx instance $(BUILDX_INSTANCE) + @docker buildx use $(BUILDX_INSTANCE) +endif @mkdir -p _output